• Post Reply Bookmark Topic Watch Topic
  • New Topic

replacing the contents of a Graphics with the contents of another Graphics  RSS feed

Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The Printable interface provides a Graphics into which I have to draw what I want. But it's calling my print() method way too many times to be reasonable to draw on the graphics from my data model that many times.

I was thinking that if I saved the contents of the Graphics I'm given after I've finished drawing on it and then in subsequent print() calls I could just provide the saved Graphics. The trouble is that print()'s signature is:

The Graphics I need to draw on is g. So I can draw on g and then create a new Graphics (say g1) with the contents of g, but how do I update g's contents from g1 on subsequent calls?

  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!