2dgraphics
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   womah_Neeranjun
Posted On:   Tuesday, October 22, 2002 09:51 PM

How can i draw 2 polygons one inside the other, and use two buttons to select and erase/load one by one again. I run into the problem that repainting the panel for the large polygon will erase the small polygon.


Please use html tags to format code blocks.

Re: 2dgraphics

Posted By:   Christopher_Schultz  
Posted On:   Wednesday, October 23, 2002 11:08 AM

Every time you repaint the panel, you'll need to decide which figure goes on top. Just draw that one last.



A typical technique is to maintain a z-value for each of your figures (that is, the z-coordinate, which sticks out of the screen towards your face). Then, you just keep that list sorted by z-value and draw them from lowest to highest value.



-chris
About | Sitemap | Contact