How to fill a polygon?

This forum can be used to talk about general design strategies, new ideas and questions in general related to wxWidgets. If you feel your questions doesn't fit anywhere, put it here.
Post Reply
samhwang
In need of some credit
In need of some credit
Posts: 9
Joined: Wed Mar 09, 2005 3:54 pm

How to fill a polygon?

Post by samhwang » Mon Mar 14, 2005 1:51 pm

I got a series of (x, y) positions, and want to fill a polygon formed by the series of positions, is it any methods to accomplish it? Thanks!

upCASE
Site Admin
Site Admin
Posts: 3176
Joined: Mon Aug 30, 2004 6:55 am
Location: Germany, Cologne

Post by upCASE » Mon Mar 14, 2005 2:10 pm

Hi!
Use wxDC::DrawPolygon and set a non-tranparent pen/brush.
OS: OpenSuSE, Ubuntu, Win XP Pro
wx: svn
Compiler: gcc 4.5.1, VC 2008, eVC 4

"If it was hard to write it should be hard to read..." - the unknown coder
"Try not! Do. Or do not. There is no try." - Yoda

samhwang
In need of some credit
In need of some credit
Posts: 9
Joined: Wed Mar 09, 2005 3:54 pm

Post by samhwang » Mon Mar 14, 2005 4:19 pm

Thanks for your concern! My purpose is to display an image first, and then apply a region selection over the image and get the selected outline by mouse movement event. Are there any similar efforts previously done? I want to have a learn from them if there are some. Thanks!

Post Reply