mkaouer/j4me

Custom drawing with translation breaks default components

Opened this issue · 0 comments

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