Helma logo
helma.org » Home > Stories > Image.drawString()

Image.drawString()

Draws text onto an image.

Syntax
imageObject.drawString(String, xNumber, yNumber)

The string will be drawn starting at the xNumber- and yNumber-offset from the top left corner of the image.

Example
var img = new Image("http://helma.org/images/original.gif");
res.write('<img src="/images/original.gif">');

Helma Object Publisher logo

img.setColor(204, 0, 0);
img.drawString("rocks!", 82, 35);
img.saveAs("/www/images/processed.gif");
res.write('<img src="/images/processed.gif">');

Helma logo with an additionally drawn text


... comment


Page last modified on 2002-07-16 16:17 by tobi