We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
IndexProgramming Questions & HelpSyntax Questions › Help! Grappling with the basics.
Page Index Toggle Pages: 1
Help! Grappling with the basics. (Read 464 times)
Help! Grappling with the basics.
May 3rd, 2007, 5:58pm
 
Okay, so I'm from the MaxMSP world, and have done a bunch of java stuff for the mxj object. I'm starting to learn Processing, working toward building a GUI for the new patch I'm working on.
I posted earlier today trying to figure out how to make an object from a hand-drawn (mouse) line. But I think my misunderstanding of how to do that comes from a more general confusion.
In music, you can add or subtract notes, chords, or instruments, pretty much at random, without effecting the general state of the piece too much. However, as I now understand it, with graphics *every* change to the appearance of the window requires a *complete* redraw of the window. Is that accurate?
The reason this makes a difference to me is that, if I want a line object that can be moved, copied, deleted, and so on, then really it's not a matter of actually copying the *line itself*, but only the commands as to how that line was made. Is that right? In this case, deleting the line would be simply redrawing the screen without the line. Moving the line would be redrawing the screen, but offsetting the points in the line, and so on.

Am I sort of on the right track?

The big question that comes from my current understanding (or misunderstanding) then, is where the state information for the window is stored? That is, if I want to delete my line object, where do I get the info required to redraw the window in a state *without* the line object?
Is this totally messsed up thinking? It's the only way it makes sense to me...

Thanks in advance to anybody patient enough to get me going in the right direction.

cheers,

J.
Re: Help! Grappling with the basics.
Reply #1 - May 3rd, 2007, 6:42pm
 
duh...

okay, maybe this just "clunked" into place. Since any drawing is redrawing *everything*, then there's no need to know the state before the line was added, since it's just the *whole* redraw, less the line...

yes?

(I'm not really as slow as I seem... promise!)
Page Index Toggle Pages: 1