Win a copy of Practical SVG this week in the HTML/CSS/JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

some other class drawing on a canvas

 
Paul Bailey
Ranch Hand
Posts: 91
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, is there a way to draw on a canvas from another class? i got the graphics with c.getGraphics() where c is a Canvas. But now i can't seem to get the old graphics to display! seems like there is something i am missing.
It is also hard to get the object that draws on the canvas to draw on it at the right times! So i had my applets repaint look like this

i can't write something that extends canvas and use the ide i am using because it won't let me change the canvas!!! argh.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!