MagickWand For PHP



MagickGetStringHeight -- returns the height of a specified string


float MagickGetStringHeight( MagickWand mgck_wnd, DrawingWand drw_wnd, string txt [, bool multiline] )

Returns the height of a specified string, or FALSE if an error occurs. This function actually calls the C API's MagickQueryFontMetrics(), but only returns one of the array elements. If you are going to be calling more than 1 of the following functions at a time, it is suggested that you call PHP's MagickQueryFontMetrics(), and use the array members it returns: MagickGetCharWidth() MagickGetCharHeight() MagickGetTextAscent() MagickGetTextDescent() MagickGetStringWidth() MagickGetStringHeight() MagickGetMaxTextAdvance() If multiline is specified, and is TRUE, the C API's MagickQueryMultilineFontMetrics() is called internally instead. It returns the same kind of array as MagickQueryFontMetrics(), but with the metrics returned being those of multiple lines of text.

A description of each parameter follows:

mgck_wnd The MagickWand
drw_wnd The DrawingWand (contains the font information)
text The text
multiline (Optional) if TRUE, causes function to return metric associated with muliple lines of text

Up Next