mkaouer / j4me

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

Custom drawing with translation breaks default components #54

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Create a custom screen by inheriting from DeviceScreen.
2. Override the paint method.
3. Do custom drawing and use the translate method on the Graphics object.

What is the expected output? What do you see instead?
Expected: A custom DeviceScreen with the menu and title bars as they are 
normally provided for by J4ME.
Instead: Black bars where the menu and title bars would normally be.

Steps to reach expected behavior:
Add this line to the end of your paint method:
g.translate(-g.getTranslateX(), -g.getTranslateY())

Original issue reported on code.google.com by new...@gmail.com on 2 Oct 2009 at 11:27