MImgPutTextAligned

Functions ››
Parent Previous Next

bOk = MImgPutTextAligned( hImageDest, nLeft, nTop, nRight, nBottom, sText, sFontName, nFontSize, nFontEnh, nColor, nAlignFlags )

Puts a text aligned into an image.

Parameters
hImage
Number: Handle of the destination image

nLeft, nTop, nRight, nBottom
Number: Rectangle for text output

sText
String: The text

sFontName
String: Font name

nFontSize
Number: Font size

nFontEnh
Number: Font enhancements. Any combination of the FONT_Enh constants and/or MIMG_FONT_ENH_CLEARTYPE.

nColor
Number: Text color

nAlignFlags
Number: One horizontal and one vertical flag:

Horizontal flags

MIMG_ALIGN_LEFT

Left

MIMG_ALIGN_HCENTER

Centered

MIMG_ALIGN_RIGHT

Right

Vertical flags

MIMG_ALIGN_TOP

Top

MIMG_ALIGN_VCENTER

Centered

MIMG_ALIGN_BOTTOM

Bottom

Return
Boolean: TRUE if successful or FALSE if an error occurs

Remarks
If the destination image has a palette ( BPP < 24 ) and the text color isn't in the palette, the nearest color from the palette is used.
The opacity values of the destination image pixel's remain unchanged.

Example

Call MImgGetSize( hImageDest, nWidth, nHeight )
Call MImgPutTextAligned( hImageDest, 0, 0, nWidth, nHeight, "This is a text", "Arial", 8, FONT_EnhBold | FONT_EnhUnderline, COLOR_Blue, MIMG_ALIGN_RIGHT | MIMG_ALIGN_BOTTOM )

Destination

Destination after MImgPutTextAligned

See also
MImgPutImage
MImgPutText

Created with the Personal Edition of HelpNDoc: Produce online help for Qt applications