yatsek / microemu

Automatically exported from code.google.com/p/microemu
0 stars 0 forks source link

drawString issue when writing on an image (microemu-android, Sony XPEDIA) #75

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?

Font font = Font.getDefaultFont();
int height = font.getHeight();
int width = font.stringWidth("y");
Image im = Image.createImage(width, height);
Graphics g = im.getGraphics();
g.setColor(0x000000);
g.fillRect(0, 0, im.getWidth(), im.getHeight());
g.setColor(0xFFFFFF);
g.setFont(font);
g.drawString("y", 0, 0, Graphics.LEFT | Graphics.TOP);

What is the expected output? What do you see instead?

When you draw the letter 'y' it isn't drawn although the picture should be big 
enough. And even if it isn't - it should be clipped but you can't see 
anything.

The only device where I recognized the error was the 
Sony XPEDIA

I don't have that device on my own but I'm using microemu-android. He sent me a 
picture (it is attached) where you can see the problem.
If I increase the size of the picture the letter is drawn. (in the bottom part 
'y's are supposed to be drawn - it works on when the image height is 2*height 
but not when it is only height)

The same happens with the letter 'o'. This time you have to increase the width 
to see the letter.

What version of the product are you using? On what operating system?
r2422 - linux

Original issue reported on code.google.com by michael....@googlemail.com on 18 Oct 2010 at 6:50

Attachments: