Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Platforms inconsistently clear/don't clear surface before root layer #50

Open
GoogleCodeExporter opened this issue Mar 27, 2015 · 2 comments

Comments

@GoogleCodeExporter
Copy link

From: https://groups.google.com/forum/#!topic/gwt-forplay/rHbpUHECLKw

HTML GL and Android clear the surface before painting the root layer, while 
Flash and Java don't. Platforms should consistently clear the surface to rgba 
(0,0,0,0) before painting the root layer.

Original issue reported on code.google.com by [email protected] on 24 Jun 2011 at 8:06

@GoogleCodeExporter
Copy link
Author

Thanks, Matt.

Original comment by [email protected] on 24 Jun 2011 at 8:09

  • Changed state: Accepted
  • Added labels: ****
  • Removed labels: ****

@GoogleCodeExporter
Copy link
Author

I would suggest changing the playn.java.JavaCanvas method clear() body to:

   gfx.setColor(new Color(currentState().fillColor));
   gfx.fillRect(0, 0, width, height);

or similarly, instead of (the current implementation):

   gfx.clearRect(0, 0, width, height);

as per the JavaDoc for the java.awt.Graphics clearRect(int, int, int, int) 
method:

http://download.oracle.com/javase/1.5.0/docs/api/java/awt/Graphics.html#clearRec
t(int, int, int, int) 

Original comment by [email protected] on 5 Nov 2011 at 5:03

  • Added labels: ****
  • Removed labels: ****

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant