Exemplo n.º 1
0
MAGICK_NET_EXPORT void DrawingWand_Font(DrawingWand *instance, const char *family, const size_t style, const size_t weight, const size_t stretch, ExceptionInfo **exception)
{
  DrawSetFontFamily(instance, family);
  DrawSetFontStyle(instance, (const StyleType)style);
  DrawSetFontWeight(instance, weight);
  DrawSetFontStretch(instance, stretch);
  MAGICK_NET_SET_DRAW_EXCEPTION;
}
Exemplo n.º 2
0
static bool HHVM_METHOD(ImagickDraw, setFontFamily,
    const String& font_family) {
  auto wand = getDrawingWandResource(Object{this_});
  if (font_family.empty()) {
    IMAGICKDRAW_THROW("Can not set empty font family");
  }
  auto status = DrawSetFontFamily(wand->getWand(), font_family.c_str());
  if (status == MagickFalse) {
    IMAGICKDRAW_THROW("Unable to set font family");
  }
  return true;
}