Drawing text to an image
Please Login to Remove!
Hi All,
There appears to be a bug with creating an image of ODD width and drawing text to that image. For example,
protected void paint(Graphics g)
{
Image img = Image.createImage(101, 100);
Graphics gi = img.getGraphics();
gi.drawString("test", 0, 0, Graphics.TOP | Graphics.LEFT);
g.drawImage(img, 0, 0, Graphics.TOP | Graphics.LEFT);
}
The text in the image appears "skewed". However, if the image is created with an EVEN width(Image.createImage(100,100)) everything is fine. This only happens on color devices(7200 and 7700). Does anyone know a fix for "bug"?
Thanks
|