J
Joe Van Dyk
Hi,
I'm drawing stuff on a TkCanvas. Essentially, a bunch of shapes that
move around. I need to keep track of where each shape has been, so I
can draw the shape's history if needed (a "slug track").
So every time a shape move, I store its position. When I want to view
a shape's history, I draw a line connecting each stored position.
I'm currently drawing all of these lines directly on to the main canvas. =
=20
The problem is when I want to hide the history lines. There can be
400 shapes, and each of them could have thousands of lines that detail
their previous history. Going through and deleting all the TkcLines
is taking a very long time.
Is there a way to "group" each shape's history lines and then be able
to give one command that shows and hides the lines in that group?
Thanks,
Joe
I'm drawing stuff on a TkCanvas. Essentially, a bunch of shapes that
move around. I need to keep track of where each shape has been, so I
can draw the shape's history if needed (a "slug track").
So every time a shape move, I store its position. When I want to view
a shape's history, I draw a line connecting each stored position.
I'm currently drawing all of these lines directly on to the main canvas. =
=20
The problem is when I want to hide the history lines. There can be
400 shapes, and each of them could have thousands of lines that detail
their previous history. Going through and deleting all the TkcLines
is taking a very long time.
Is there a way to "group" each shape's history lines and then be able
to give one command that shows and hides the lines in that group?
Thanks,
Joe