Thursday, 12 September 2013

How to move an entire GPen object?

How to move an entire GPen object?

In Java using the acm.graphics GPen is there any way to move the entire
drawn sequence of lines? I've read the manual thoroughly and I'm beginning
to think it's not possible which brings me to my second question. Are
there any other graphics objects in Java that work very similar to a pen
that can also be moved. The reason I'm asking is because I've been working
on a graphing program that allows mouse gestures to be used to pan around
and zoom in and out. After building functionality for implicit functions I
realized simply clearing the drawing board and redrawing everything is not
going to cut it anymore so I really need to work on more efficient ways to
handle intermediate changes of the graph without having to recalculate
everything.

No comments:

Post a Comment