image.drawText()
Draws a text string on a image with the baseline of the first character positioned at (x,y) in the image.
image.drawText( string=string, x=number, y=number, attributeCollection=struct )
Returns: Image
| Argument | Description |
|---|---|
|
string
string,
required
|
edit
the text to draw. Alias: str |
|
x
number,
required
|
edit
The x coordinate for the start point of the string. |
|
y
number,
required
|
edit
The y coordinate for the start point of the string. |
|
attributeCollection
struct,
optional
|
edit
A structure used to specify the text characteristics. the following keys are supported:
|
Examples
edit img=imageNew("",300,300,"RGB","##bf4f36");
style={size="40",style="BOLD"};
img.DrawText("I love lucee",55,120,style);
cfimage(action="writeToBrowser",source=img);