Add text on an image.


.AddText(sImageIndex, x, y, text, textColor, backgroundColor, backgroundRoundRadius, backgroundOpacity);


<short> sImageIndex: specifies the index of image in buffer. The index is 0-based.
<int> x: specifies the x-coordinate of the upper-left corner of the text
<int> y: specifies the y-coordinate of the upper-left corner of the text.
<string> text: specifies the content of the text.
<int> textColor: specifies the color for the text.
<int> backgroundColor: specifies the background color. It is a value specifying the 24-bit RGB value.

Default is white (0xffffff). The byte-ordering of the 24-bit RGB value is BBGGRR. BB represents blue, GG represents green and RR represents red.

<float> backgroundRoundRadius: specifies the background round radius ranging from 0 to 0.5.
<float> backgroundOpacity: specifies the opacity of the color. 1.0 is 100% opaque and 0.0 is totally transparent.

Return value


true indicates success. false indicates failure.

When false is returned, check ErrorCode or ErrorString for error information.


Currently this method is only valid in Windows & Mac.

See also



DWObject.CreateTextFont(50, 30, 0, 0, 10, 0, 0, 0, 0, 0, 0, 0, 0, "Arial");
DWObject.AddText(0, 250, 600, 'Dynamic Web TWAIN', 0x0000ff, 0xff0000, 0.5, 0.5);
Is this page helpful?

Leave a Reply

Your email address will not be published.