86 #if defined(MAGICKCORE_FREETYPE_DELEGATE) 87 #if defined(__MINGW32__) 91 #if defined(FT_FREETYPE_H) 92 # include FT_FREETYPE_H 94 # include <freetype/freetype.h> 96 #if defined(FT_GLYPH_H) 99 # include <freetype/ftglyph.h> 101 #if defined(FT_OUTLINE_H) 102 # include FT_OUTLINE_H 104 # include <freetype/ftoutln.h> 106 #if defined(FT_BBOX_H) 109 # include <freetype/ftbbox.h> 112 #if defined(MAGICKCORE_RAQM_DELEGATE) 262 assert(image != (
Image *) NULL);
266 assert(draw_info != (
DrawInfo *) NULL);
268 if (draw_info->
text == (
char *) NULL)
270 if (*draw_info->
text ==
'\0')
274 annotate->
text=(
char *) NULL;
277 for (p=text; *p !=
'\0'; p++)
281 if (textlist == (
char **) NULL)
289 for (i=0; i < (ssize_t) number_lines; i++)
295 for (q=p; *q !=
'\0'; q++)
296 if ((*q ==
'\r') || (*q ==
'\n'))
306 textlist[i]=(
char *) NULL;
309 if (annotate_info->
geometry != (
char *) NULL)
326 (void) memset(&metrics,0,
sizeof(metrics));
327 for (i=0; textlist[i] != (
char *) NULL; i++)
329 if (*textlist[i] ==
'\0')
354 offset.
x=(geometry.
width == 0 ? -1.0 : 1.0)*annotate_info->
affine.
tx+i*
357 offset.
y=(geometry.
height == 0 ? -1.0 : 1.0)*annotate_info->
affine.
ty+i*
364 offset.
x=(geometry.
width == 0 ? -1.0 : 1.0)*annotate_info->
affine.
tx+
368 offset.
y=(geometry.
height == 0 ? -1.0 : 1.0)*annotate_info->
affine.
ty+i*
375 offset.
x=(geometry.
width == 0 ? 1.0 : -1.0)*annotate_info->
affine.
tx+
379 offset.
y=(geometry.
height == 0 ? -1.0 : 1.0)*annotate_info->
affine.
ty+i*
386 offset.
x=(geometry.
width == 0 ? -1.0 : 1.0)*annotate_info->
affine.
tx+i*
388 (metrics.
ascent+metrics.
descent-(number_lines-1.0)*height)/2.0;
392 (number_lines-1.0)*height)/2.0;
397 offset.
x=(geometry.
width == 0 ? -1.0 : 1.0)*annotate_info->
affine.
tx+
400 (metrics.
ascent+metrics.
descent-(number_lines-1.0)*height)/2.0;
404 (metrics.
ascent+metrics.
descent-(number_lines-1.0)*height)/2.0;
409 offset.
x=(geometry.
width == 0 ? 1.0 : -1.0)*annotate_info->
affine.
tx+
413 (number_lines-1.0)*height)/2.0-1.0;
418 (number_lines-1.0)*height)/2.0;
423 offset.
x=(geometry.
width == 0 ? -1.0 : 1.0)*annotate_info->
affine.
tx+i*
425 (number_lines-1.0)*height;
433 offset.
x=(geometry.
width == 0 ? -1.0 : 1.0)*annotate_info->
affine.
tx+
436 annotate_info->
affine.
ry*(number_lines-1.0)*height/2.0;
445 offset.
x=(geometry.
width == 0 ? 1.0 : -1.0)*annotate_info->
affine.
tx+
448 annotate_info->
affine.
ry*(number_lines-1.0)*height-1.0;
456 switch (annotate->
align)
497 "rectangle 0.0,0.0 %g,%g",metrics.
origin.
x,(
double) height);
499 (void)
DrawImage(image,undercolor_info,exception);
504 pixel=annotate_info->
fill;
506 pixel=annotate_info->
stroke;
509 "stroke-width %g line 0,0 %g,0",color,(
double)
521 (void)
DrawImage(image,annotate_info,exception);
529 (void)
DrawImage(image,annotate_info,exception);
535 status=
RenderType(image,annotate,&offset,&metrics,exception);
543 (void)
DrawImage(image,annotate_info,exception);
630 if (width <= image->columns)
632 if (s != (
char *) NULL)
646 if ((n > 0) && ((*caption)[n-1] !=
'\n'))
746 assert(image != (
Image *) NULL);
750 assert(draw_info != (
DrawInfo *) NULL);
751 assert(draw_info->
text != (
char *) NULL);
753 if (*draw_info->
text ==
'\0')
761 if (textlist == (
char **) NULL)
765 (void) memset(metrics,0,
sizeof(*metrics));
766 (void) memset(&extent,0,
sizeof(extent));
770 annotate_info->
text=textlist[0];
779 "WidthOrHeightExceedsLimit",
"`%s'",image->
filename);
784 for (i=1; i < (ssize_t) count; i++)
786 annotate_info->
text=textlist[i];
796 "WidthOrHeightExceedsLimit",
"`%s'",image->
filename);
801 metrics->
height=(double) height;
806 annotate_info->
text=(
char *) NULL;
808 for (i=0; i < (ssize_t) count; i++)
872 assert(image != (
Image *) NULL);
876 assert(draw_info != (
DrawInfo *) NULL);
877 assert(draw_info->
text != (
char *) NULL);
882 (void) memset(metrics,0,
sizeof(*metrics));
885 status=
RenderType(image,annotate_info,&offset,metrics,exception);
888 "width: %g; height: %g; ascent: %g; descent: %g; max advance: %g; " 889 "bounds: %g,%g %g,%g; origin: %g,%g; pixels per em: %g,%g; " 890 "underline position: %g; underline thickness: %g",annotate_info->
text,
951 if (draw_info->
font != (
char *) NULL)
953 if (*draw_info->
font ==
'@')
959 if (*draw_info->
font ==
'-')
960 return(
RenderX11(image,draw_info,offset,metrics,exception));
961 if (*draw_info->
font ==
'^')
970 if (type_info == (
const TypeInfo *) NULL)
972 "UnableToReadFont",
"`%s'",draw_info->
font);
974 if ((type_info == (
const TypeInfo *) NULL) &&
975 (draw_info->
family != (
const char *) NULL))
977 if (strchr(draw_info->
family,
',') == (
char *) NULL)
980 if (type_info == (
const TypeInfo *) NULL)
995 for (i=1; i < (ssize_t) number_families; i++)
999 if ((type_info != (
const TypeInfo *) NULL) &&
1003 for (i=0; i < (ssize_t) number_families; i++)
1006 if (type_info == (
const TypeInfo *) NULL)
1008 "UnableToReadFont",
"`%s'",draw_info->
family);
1012 if (font != (
char *) NULL)
1020 annotate_info->
font=font;
1022 offset,metrics,exception);
1029 if (type_info == (
const TypeInfo *) NULL)
1032 if (type_info == (
const TypeInfo *) NULL)
1035 if (type_info == (
const TypeInfo *) NULL)
1038 if (type_info == (
const TypeInfo *) NULL)
1041 if (type_info == (
const TypeInfo *) NULL)
1048 annotate_info->
face=type_info->
face;
1049 if (type_info->
metrics != (
char *) NULL)
1051 if (type_info->
glyphs != (
char *) NULL)
1095 #if defined(MAGICKCORE_FREETYPE_DELEGATE) 1097 static size_t ComplexTextLayout(
const Image *image,
const DrawInfo *draw_info,
1098 const char *text,
const size_t length,
const FT_Face face,
const FT_Int32 flags,
1101 #if defined(MAGICKCORE_RAQM_DELEGATE) 1120 if (rq == (raqm_t *) NULL)
1122 if (raqm_set_text_utf8(rq,text,length) == 0)
1124 if (raqm_set_par_direction(rq,(raqm_direction_t) draw_info->
direction) == 0)
1126 if (raqm_set_freetype_face(rq,face) == 0)
1129 if (features != (
const char *) NULL)
1146 status_token=
Tokenizer(token_info,0,token,50,features,
"",
",",
"",
'\0',
1147 &breaker,&next,"e);
1148 while (status_token == 0)
1150 raqm_add_font_feature(rq,token,strlen(token));
1151 status_token=
Tokenizer(token_info,0,token,50,features,
"",
",",
"",
'\0',
1152 &breaker,&next,"e);
1157 if (raqm_layout(rq) == 0)
1159 glyphs=raqm_get_glyphs(rq,&extent);
1160 if (glyphs == (raqm_glyph_t *) NULL)
1171 for (i=0; i < (ssize_t) extent; i++)
1173 (*grapheme)[i].index=glyphs[i].index;
1174 (*grapheme)[i].x_offset=glyphs[i].x_offset;
1175 (*grapheme)[i].x_advance=glyphs[i].x_advance;
1176 (*grapheme)[i].y_offset=glyphs[i].y_offset;
1177 (*grapheme)[i].cluster=glyphs[i].cluster;
1208 (*grapheme)[i].index=(ssize_t) FT_Get_Char_Index(face,
GetUTFCode(p));
1209 (*grapheme)[i].x_offset=0;
1210 (*grapheme)[i].y_offset=0;
1211 if (((*grapheme)[i].index != 0) && (last_glyph != 0))
1213 if (FT_HAS_KERNING(face))
1218 ft_status=FT_Get_Kerning(face,(FT_UInt) last_glyph,(FT_UInt)
1219 (*grapheme)[i].index,ft_kerning_default,&kerning);
1221 (*grapheme)[i-1].x_advance+=(FT_Pos) ((draw_info->
direction ==
1225 ft_status=FT_Load_Glyph(face,(FT_UInt) (*grapheme)[i].index,flags);
1226 (*grapheme)[i].x_advance=face->glyph->advance.x;
1227 (*grapheme)[i].cluster=p-text;
1228 last_glyph=(*grapheme)[i].index;
1236 return((outline.n_points == 0) || (outline.n_contours <= 0) ?
MagickTrue :
1240 static int TraceCubicBezier(FT_Vector *p,FT_Vector *q,FT_Vector *to,
1249 affine=draw_info->
affine;
1251 affine.
tx+p->x/64.0,affine.
ty-p->y/64.0,affine.
tx+q->x/64.0,affine.
ty-
1252 q->y/64.0,affine.
tx+to->x/64.0,affine.
ty-to->y/64.0);
1257 static int TraceLineTo(FT_Vector *to,
DrawInfo *draw_info)
1265 affine=draw_info->
affine;
1267 affine.
ty-to->y/64.0);
1272 static int TraceMoveTo(FT_Vector *to,
DrawInfo *draw_info)
1280 affine=draw_info->
affine;
1282 affine.
ty-to->y/64.0);
1287 static int TraceQuadraticBezier(FT_Vector *control,FT_Vector *to,
1296 affine=draw_info->
affine;
1298 control->x/64.0,affine.
ty-control->y/64.0,affine.
tx+to->x/64.0,affine.
ty-
1308 #if !defined(FT_OPEN_PATHNAME) 1309 #define FT_OPEN_PATHNAME ft_open_pathname 1312 typedef struct _GlyphInfo
1392 static FT_Outline_Funcs
1395 (FT_Outline_MoveTo_Func) TraceMoveTo,
1396 (FT_Outline_LineTo_Func) TraceLineTo,
1397 (FT_Outline_ConicTo_Func) TraceQuadraticBezier,
1398 (FT_Outline_CubicTo_Func) TraceCubicBezier,
1408 ft_status=FT_Init_FreeType(&library);
1412 args.flags=FT_OPEN_PATHNAME;
1413 if (draw_info->
font == (
char *) NULL)
1416 if (*draw_info->
font !=
'@')
1420 face=(FT_Face) NULL;
1421 ft_status=FT_Open_Face(library,&args,(
long) draw_info->
face,&face);
1424 (void) FT_Done_FreeType(library);
1426 "UnableToReadFont",
"`%s'",args.pathname);
1431 if ((draw_info->
metrics != (
char *) NULL) &&
1433 (void) FT_Attach_File(face,draw_info->
metrics);
1434 encoding_type=FT_ENCODING_UNICODE;
1435 ft_status=FT_Select_Charmap(face,encoding_type);
1436 if ((ft_status != 0) && (face->num_charmaps != 0))
1437 ft_status=FT_Set_Charmap(face,face->charmaps[0]);
1438 if (encoding != (
const char *) NULL)
1441 encoding_type=FT_ENCODING_ADOBE_CUSTOM;
1443 encoding_type=FT_ENCODING_ADOBE_EXPERT;
1445 encoding_type=FT_ENCODING_ADOBE_STANDARD;
1447 encoding_type=FT_ENCODING_APPLE_ROMAN;
1449 encoding_type=FT_ENCODING_BIG5;
1450 #if defined(FT_ENCODING_PRC) 1452 encoding_type=FT_ENCODING_PRC;
1454 #if defined(FT_ENCODING_JOHAB) 1456 encoding_type=FT_ENCODING_JOHAB;
1458 #if defined(FT_ENCODING_ADOBE_LATIN_1) 1460 encoding_type=FT_ENCODING_ADOBE_LATIN_1;
1462 #if defined(FT_ENCODING_ADOBE_LATIN_2) 1464 encoding_type=FT_ENCODING_OLD_LATIN_2;
1467 encoding_type=FT_ENCODING_NONE;
1469 encoding_type=FT_ENCODING_SJIS;
1471 encoding_type=FT_ENCODING_MS_SYMBOL;
1473 encoding_type=FT_ENCODING_UNICODE;
1475 encoding_type=FT_ENCODING_WANSUNG;
1476 ft_status=FT_Select_Charmap(face,encoding_type);
1479 (void) FT_Done_Face(face);
1480 (void) FT_Done_FreeType(library);
1489 if (draw_info->
density != (
char *) NULL)
1498 resolution.
x=geometry_info.
rho;
1499 resolution.
y=geometry_info.
sigma;
1501 resolution.
y=resolution.
x;
1503 ft_status=FT_Set_Char_Size(face,(FT_F26Dot6) (64.0*draw_info->
pointsize),
1504 (FT_F26Dot6) (64.0*draw_info->
pointsize),(FT_UInt) resolution.
x,
1505 (FT_UInt) resolution.
y);
1508 (void) FT_Done_Face(face);
1509 (void) FT_Done_FreeType(library);
1514 metrics->
ascent=(double) face->size->metrics.ascender/64.0;
1515 metrics->
descent=(
double) face->size->metrics.descender/64.0;
1516 if (face->size->metrics.ascender == 0)
1521 metrics->
ascent=face->size->metrics.y_ppem;
1522 if (face->size->metrics.descender == 0)
1523 metrics->
descent=face->size->metrics.y_ppem/-3.5;
1528 metrics->
height=(double) face->size->metrics.height/64.0;
1531 metrics->
max_advance=(double) face->size->metrics.max_advance/64.0;
1541 FT_Get_First_Char(face,&first_glyph_id);
1542 if ((draw_info->
text == (
char *) NULL) || (*draw_info->
text ==
'\0') ||
1543 (first_glyph_id == 0))
1545 (void) FT_Done_Face(face);
1546 (void) FT_Done_FreeType(library);
1554 "font-encoding %s; text-encoding %s; pointsize %g",
1555 draw_info->
font != (
char *) NULL ? draw_info->
font :
"none",
1556 encoding != (
char *) NULL ? encoding :
"none",
1559 flags=FT_LOAD_DEFAULT;
1561 flags=FT_LOAD_NO_BITMAP;
1563 flags|=FT_LOAD_RENDER | FT_LOAD_TARGET_MONO;
1566 #if defined(FT_LOAD_TARGET_LIGHT) 1567 flags|=FT_LOAD_TARGET_LIGHT;
1568 #elif defined(FT_LOAD_TARGET_LCD) 1569 flags|=FT_LOAD_TARGET_LCD;
1573 if ((value != (
const char *) NULL) && (
LocaleCompare(value,
"off") == 0))
1574 flags|=FT_LOAD_NO_HINTING;
1576 glyph.image=(FT_Glyph) NULL;
1586 affine.xx=(FT_Fixed) (65536L*draw_info->
affine.
sx+0.5);
1587 affine.yx=(FT_Fixed) (-65536L*draw_info->
affine.
rx+0.5);
1588 affine.xy=(FT_Fixed) (-65536L*draw_info->
affine.
ry+0.5);
1589 affine.yy=(FT_Fixed) (65536L*draw_info->
affine.
sy+0.5);
1606 utf8=(
unsigned char *) NULL;
1612 if (utf8 != (
unsigned char *) NULL)
1616 length=ComplexTextLayout(image,draw_info,p,strlen(p),face,flags,&grapheme,
1618 missing_glyph_id=FT_Get_Char_Index(face,
' ');
1620 last_character=(ssize_t) length-1;
1621 for (i=0; i < (ssize_t) length; i++)
1629 glyph.id=(FT_UInt) grapheme[i].index;
1631 glyph.id=missing_glyph_id;
1632 if ((glyph.id != 0) && (last_glyph_id != 0))
1633 origin.x+=(FT_Pos) (64.0*draw_info->
kerning);
1634 glyph.origin=origin;
1635 glyph.origin.x+=(FT_Pos) grapheme[i].x_offset;
1636 glyph.origin.y+=(FT_Pos) grapheme[i].y_offset;
1637 if (glyph.image != (FT_Glyph) NULL)
1639 FT_Done_Glyph(glyph.image);
1640 glyph.image=(FT_Glyph) NULL;
1642 ft_status=FT_Load_Glyph(face,glyph.id,flags);
1645 ft_status=FT_Get_Glyph(face->glyph,&glyph.image);
1648 outline=((FT_OutlineGlyph) glyph.image)->outline;
1649 if ((glyph.image->format != FT_GLYPH_FORMAT_OUTLINE) &&
1652 ft_status=FT_Outline_Get_BBox(&outline,&bounds);
1655 if ((p == draw_info->
text) || (bounds.xMin < metrics->
bounds.
x1))
1656 if (bounds.xMin != 0)
1657 metrics->
bounds.
x1=(double) bounds.xMin;
1658 if ((p == draw_info->
text) || (bounds.yMin < metrics->
bounds.
y1))
1659 if (bounds.yMin != 0)
1660 metrics->
bounds.
y1=(double) bounds.yMin;
1661 if ((p == draw_info->
text) || (bounds.xMax > metrics->
bounds.
x2))
1662 if (bounds.xMax != 0)
1663 metrics->
bounds.
x2=(double) bounds.xMax;
1664 if ((p == draw_info->
text) || (bounds.yMax > metrics->
bounds.
y2))
1665 if (bounds.yMax != 0)
1666 metrics->
bounds.
y2=(double) bounds.yMax;
1674 annotate_info->
affine.
tx=glyph.origin.x/64.0;
1675 annotate_info->
affine.
ty=(-glyph.origin.y/64.0);
1677 ft_status=FT_Outline_Decompose(&outline,&OutlineMethods,
1680 FT_Vector_Transform(&glyph.origin,&affine);
1681 (void) FT_Glyph_Transform(glyph.image,&affine,&glyph.origin);
1682 ft_status=FT_Glyph_To_Bitmap(&glyph.image,FT_RENDER_MODE_NORMAL,
1686 bitmap=(FT_BitmapGlyph) glyph.image;
1687 point.
x=offset->
x+bitmap->left;
1688 if (bitmap->bitmap.pixel_mode == ft_pixel_mode_mono)
1689 point.
x+=(origin.x/64.0);
1690 point.
y=offset->
y-bitmap->top;
1711 r=bitmap->bitmap.buffer;
1712 for (y=0; y < (ssize_t) bitmap->bitmap.rows; y++)
1739 if ((y_offset < 0) || (y_offset >= (ssize_t) image->
rows))
1742 if ((x_offset < 0) || (x_offset >= (ssize_t) image->
columns))
1747 bitmap->bitmap.width,1,exception);
1750 n=y*bitmap->bitmap.pitch;
1751 for (x=0; x < (ssize_t) bitmap->bitmap.width; x++, n++)
1754 if ((x_offset < 0) || (x_offset >= (ssize_t) image->
columns))
1761 if (bitmap->bitmap.buffer != (
unsigned char *) NULL)
1763 if (bitmap->bitmap.pixel_mode == ft_pixel_mode_grays)
1764 fill_opacity=(double) (r[n])/(bitmap->bitmap.num_grays-1);
1766 if (bitmap->bitmap.pixel_mode == ft_pixel_mode_mono)
1767 fill_opacity=((r[(x >> 3)+y*bitmap->bitmap.pitch] &
1768 (1 << (~x & 0x07)))) == 0 ? 0.0 : 1.0;
1771 fill_opacity=fill_opacity >= 0.5 ? 1.0 : 0.0;
1780 GetFillColor(draw_info,x_offset,y_offset,&fill_color,exception);
1781 fill_opacity=fill_opacity*fill_color.
alpha;
1820 if (strlen(annotate_info->
primitive) > 7)
1821 (
void)
DrawImage(image,annotate_info,exception);
1830 if (i == last_character)
1831 origin.x+=
MagickMax((FT_Pos) grapheme[i].x_advance,bounds.xMax);
1833 origin.x+=(FT_Pos) grapheme[i].x_advance;
1834 metrics->
origin.
x=(double) origin.x;
1835 metrics->
origin.
y=(
double) origin.y;
1838 last_glyph_id=glyph.id;
1843 if (utf8 != (
unsigned char *) NULL)
1845 if (glyph.image != (FT_Glyph) NULL)
1847 FT_Done_Glyph(glyph.image);
1848 glyph.image=(FT_Glyph) NULL;
1864 (void) FT_Done_Face(face);
1865 (void) FT_Done_FreeType(library);
1875 draw_info->
font != (
char *) NULL ? draw_info->
font :
"none");
1927 assert(source != (
const char *) NULL);
1929 for (p=source; *p !=
'\0'; p++)
1931 if ((*p ==
'\\') || (*p ==
'(') || (*p ==
')'))
1939 destination=(
char *) NULL;
1942 sizeof(*destination));
1943 if (destination == (
char *) NULL)
1947 for (p=source; *p !=
'\0'; p++)
1949 if ((*p ==
'\\') || (*p ==
'(') || (*p ==
')'))
1954 return(destination);
2000 "Font %s; pointsize %g",draw_info->
font != (
char *) NULL ?
2004 if (unique_file != -1)
2005 file=fdopen(unique_file,
"wb");
2006 if ((unique_file == -1) || (file == (FILE *) NULL))
2016 " dict begin { 1 index /FID ne {def} {pop pop} ifelse } forall\n");
2018 " /Encoding ISOLatin1Encoding def currentdict end definefont pop\n");
2028 length=strlen(draw_info->
text);
2029 for (i=0; i <= (ssize_t) (length+2); i++)
2035 if (point.
x > extent.
x)
2037 if (point.
y > extent.
y)
2041 extent.
x/2.0,extent.
y/2.0);
2044 if ((draw_info->
font == (
char *) NULL) || (*draw_info->
font ==
'\0') ||
2045 (strchr(draw_info->
font,
'/') != (
char *) NULL))
2047 "/Times-Roman-ISO dup /Times-Roman ReencodeType findfont setfont\n");
2050 "/%s-ISO dup /%s ReencodeType findfont setfont\n",draw_info->
font,
2057 (void)
FormatLocaleFile(file,
"(%s) stringwidth pop -0.5 mul -0.5 rmoveto\n",
2062 (void) fclose(file);
2064 floor(extent.
x+0.5),floor(extent.
y+0.5));
2069 if (draw_info->
density != (
char *) NULL)
2072 annotate_image=
ReadImage(annotate_info,exception);
2076 if (annotate_image == (
Image *) NULL)
2081 if (draw_info->
density != (
char *) NULL)
2090 resolution.
x=geometry_info.
rho;
2091 resolution.
y=geometry_info.
sigma;
2093 resolution.
y=resolution.
x;
2096 (void)
TransformImage(&annotate_image,
"0x0",(
char *) NULL,exception);
2108 "%.20gx%.20g%+.20g%+.20g",(
double) crop_info.
width,(double)
2109 crop_info.
height,(
double) crop_info.
x,(double) crop_info.
y);
2110 (void)
TransformImage(&annotate_image,geometry,(
char *) NULL,exception);
2151 fill_color=draw_info->
fill;
2153 for (y=0; y < (ssize_t) annotate_image->
rows; y++)
2165 for (x=0; x < (ssize_t) annotate_image->
columns; x++)
2181 (ssize_t) ceil(offset->
x-0.5),(ssize_t) ceil(offset->
y-(metrics->
ascent+
2182 metrics->
descent)-0.5),exception);
2229 status=
XRenderImage(image,draw_info,offset,metrics,exception);
MagickExport MagickBooleanType NegateImage(Image *image, const MagickBooleanType grayscale, ExceptionInfo *exception)
MagickExport CacheView * DestroyCacheView(CacheView *cache_view)
MagickExport TokenInfo * DestroyTokenInfo(TokenInfo *token_info)
MagickExport MagickBooleanType QueryColorname(const Image *magick_unused(image), const PixelInfo *color, const ComplianceType compliance, char *name, ExceptionInfo *exception)
MagickExport ImageInfo * AcquireImageInfo(void)
MagickPrivate void AnnotateComponentTerminus(void)
MagickExport size_t ConcatenateMagickString(char *magick_restrict destination, const char *magick_restrict source, const size_t length)
static Quantum GetPixelAlpha(const Image *magick_restrict image, const Quantum *magick_restrict pixel)
MagickExport void UnlockSemaphoreInfo(SemaphoreInfo *semaphore_info)
MagickExport const TypeInfo * GetTypeInfo(const char *name, ExceptionInfo *exception)
static int GetUTFCode(const char *magick_restrict text)
#define ThrowFatalException(severity, tag)
static void GetFillColor(const DrawInfo *draw_info, const ssize_t x, const ssize_t y, PixelInfo *fill, ExceptionInfo *exception)
MagickExport void SetGeometryInfo(GeometryInfo *geometry_info)
MagickExport SemaphoreInfo * AcquireSemaphoreInfo(void)
static MagickBooleanType IsUTFSpace(int code)
MagickBooleanType antialias
MagickExport ExceptionInfo * AcquireExceptionInfo(void)
MagickExport ssize_t FormatLocaleString(char *magick_restrict string, const size_t length, const char *magick_restrict format,...)
static MagickBooleanType IsGrayColorspace(const ColorspaceType colorspace)
MagickExport size_t CopyMagickString(char *magick_restrict destination, const char *magick_restrict source, const size_t length)
#define DefaultResolution
static MagickBooleanType RenderPostscript(Image *, const DrawInfo *, const PointInfo *, TypeMetric *, ExceptionInfo *)
MagickExport MagickBooleanType CompositeImage(Image *image, const Image *composite, const CompositeOperator compose, const MagickBooleanType clip_to_self, const ssize_t x_offset, const ssize_t y_offset, ExceptionInfo *exception)
MagickExport MagickBooleanType AcquireMagickResource(const ResourceType type, const MagickSizeType size)
#define ThrowBinaryException(severity, tag, context)
static Quantum ClampToQuantum(const MagickRealType quantum)
MagickExport void GetPixelInfo(const Image *image, PixelInfo *pixel)
MagickExport TokenInfo * AcquireTokenInfo(void)
#define MagickCoreSignature
MagickExport void LockSemaphoreInfo(SemaphoreInfo *semaphore_info)
MagickExport Quantum * GetCacheViewAuthenticPixels(CacheView *cache_view, const ssize_t x, const ssize_t y, const size_t columns, const size_t rows, ExceptionInfo *exception)
static MagickBooleanType RenderType(Image *, const DrawInfo *, const PointInfo *, TypeMetric *, ExceptionInfo *)
MagickExport double ExpandAffine(const AffineMatrix *affine)
MagickExport ssize_t FormatMagickCaption(Image *image, DrawInfo *draw_info, const MagickBooleanType split, TypeMetric *metrics, char **caption, ExceptionInfo *exception)
MagickExport ssize_t FormatLocaleFile(FILE *file, const char *magick_restrict format,...)
MagickExport MagickBooleanType SetImageAlphaChannel(Image *image, const AlphaChannelOption alpha_type, ExceptionInfo *exception)
unsigned int MagickStatusType
MagickExport char * AcquireString(const char *source)
MagickExport MagickStatusType ParsePageGeometry(const Image *image, const char *geometry, RectangleInfo *region_info, ExceptionInfo *exception)
static double PerceptibleReciprocal(const double x)
MagickExport int AcquireUniqueFileResource(char *path)
MagickExport MagickBooleanType AnnotateImage(Image *image, const DrawInfo *draw_info, ExceptionInfo *exception)
MagickExport void * AcquireQuantumMemory(const size_t count, const size_t quantum)
char filename[MagickPathExtent]
MagickExport MagickBooleanType RelinquishUniqueFileResource(const char *path)
MagickPrivate MagickBooleanType XRenderImage(Image *, const DrawInfo *, const PointInfo *, TypeMetric *, ExceptionInfo *)
MagickExport MagickBooleanType DrawImage(Image *image, const DrawInfo *draw_info, ExceptionInfo *exception)
static SemaphoreInfo * annotate_semaphore
#define ThrowFileException(exception, severity, tag, context)
MagickExport Image * ReadImage(const ImageInfo *image_info, ExceptionInfo *exception)
static MagickBooleanType RenderX11(Image *, const DrawInfo *, const PointInfo *, TypeMetric *, ExceptionInfo *)
MagickExport MagickBooleanType ThrowMagickException(ExceptionInfo *exception, const char *module, const char *function, const size_t line, const ExceptionType severity, const char *tag, const char *format,...)
MagickExport MagickBooleanType LogMagickEvent(const LogEventType type, const char *module, const char *function, const size_t line, const char *format,...)
MagickExport MagickBooleanType IsPathAccessible(const char *path)
MagickExport const TypeInfo * GetTypeInfoByFamily(const char *family, const StyleType style, const StretchType stretch, const size_t weight, ExceptionInfo *exception)
MagickExport DrawInfo * CloneDrawInfo(const ImageInfo *image_info, const DrawInfo *draw_info)
static void SetPixelBlue(const Image *magick_restrict image, const Quantum blue, Quantum *magick_restrict pixel)
MagickPrivate MagickBooleanType AnnotateComponentGenesis(void)
MagickExport MagickBooleanType SetImageStorageClass(Image *image, const ClassType storage_class, ExceptionInfo *exception)
MagickExport void CatchException(ExceptionInfo *exception)
static double RoundToUnity(const double value)
static size_t GetPixelChannels(const Image *magick_restrict image)
MagickExport int LocaleCompare(const char *p, const char *q)
static ssize_t CastDoubleToLong(const double value)
char filename[MagickPathExtent]
#define GetMagickModule()
double underline_thickness
MagickExport MagickBooleanType GetMultilineTypeMetrics(Image *image, const DrawInfo *draw_info, TypeMetric *metrics, ExceptionInfo *exception)
MagickExport ImageInfo * DestroyImageInfo(ImageInfo *image_info)
MagickExport MagickBooleanType GetTypeMetrics(Image *image, const DrawInfo *draw_info, TypeMetric *metrics, ExceptionInfo *exception)
MagickExport RectangleInfo GetImageBoundingBox(const Image *image, ExceptionInfo *exception)
MagickExport MagickBooleanType SetImageColorspace(Image *image, const ColorspaceType colorspace, ExceptionInfo *exception)
MagickExport DrawInfo * DestroyDrawInfo(DrawInfo *draw_info)
MagickExport char * DestroyString(char *string)
MagickExport void ActivateSemaphoreInfo(SemaphoreInfo **semaphore_info)
MagickExport const char * GetImageProperty(const Image *image, const char *property, ExceptionInfo *exception)
double underline_position
static char * EscapeParenthesis(const char *source)
MagickBooleanType text_antialias
MagickExport MagickStatusType ParseGeometry(const char *geometry, GeometryInfo *geometry_info)
MagickExport char * GetPolicyValue(const char *name)
static void SetPixelAlpha(const Image *magick_restrict image, const Quantum alpha, Quantum *magick_restrict pixel)
MagickExport void SetGeometry(const Image *image, RectangleInfo *geometry)
MagickExport MagickBooleanType ConcatenateString(char **magick_restrict destination, const char *magick_restrict source)
static MagickBooleanType RenderFreetype(Image *, const DrawInfo *, const char *, const PointInfo *, TypeMetric *, ExceptionInfo *)
MagickExport void * RelinquishMagickMemory(void *memory)
#define magick_unreferenced(x)
static unsigned int GetUTFOctets(const char *magick_restrict text)
MagickExport char * CloneString(char **destination, const char *source)
MagickExport char ** StringToStrings(const char *text, size_t *count)
static void SetPixelRed(const Image *magick_restrict image, const Quantum red, Quantum *magick_restrict pixel)
static unsigned char * ConvertLatin1ToUTF8(const unsigned char *magick_restrict content)
MagickExport MagickBooleanType SyncCacheViewAuthenticPixels(CacheView *magick_restrict cache_view, ExceptionInfo *exception)
MagickExport CacheView * AcquireAuthenticCacheView(const Image *image, ExceptionInfo *exception)
MagickExport char ** StringToArgv(const char *text, int *argc)
MagickExport MagickRealType GetPixelIntensity(const Image *magick_restrict image, const Quantum *magick_restrict pixel)
MagickExport void RelinquishSemaphoreInfo(SemaphoreInfo **semaphore_info)
MagickExport Image * DestroyImage(Image *image)
MagickExport char * ConstantString(const char *source)
ColorspaceType colorspace
MagickExport int Tokenizer(TokenInfo *token_info, const unsigned flag, char *token, const size_t max_token_length, const char *line, const char *white, const char *break_set, const char *quote, const char escape, char *breaker, int *next, char *quoted)
static void CompositePixelOver(const Image *image, const PixelInfo *p, const double alpha, const Quantum *q, const double beta, Quantum *composite)
MagickExport ExceptionInfo * DestroyExceptionInfo(ExceptionInfo *exception)
static void SetPixelGreen(const Image *magick_restrict image, const Quantum green, Quantum *magick_restrict pixel)
struct _GraphemeInfo GraphemeInfo