I think canvas should contain a method to clear entire canvas
regardless of current context.

The clearing approach with Integer.MIN-MAX works great on
chrome,safar,opera but not ie and ff.

/*
 * canvas.getContext2d().save();
 * canvas.getContext2d().setTransform(1,0,0,1,0,0);
 * canvas.getContext2d().clearRect(0, 0,
 * canvas.getCoordinateSpaceWidth(),
canvas.getCoordinateSpaceHeight());
 * canvas.getContext2d().restore();
 */

canvas.getContext2d().clearRect(Integer.MIN_VALUE / 2,
        Integer.MIN_VALUE / 2, Integer.MAX_VALUE, Integer.MAX_VALUE);

/* canvas.getContext2d().clearRect(0,0,
canvas.getCanvasElement().getWidth(),
canvas.getCanvasElement().getHeight());
*/

-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.

Reply via email to