Groups | Blog | Home
all groups > c# > april 2005 >

c# : define the points enclosed within a polygon


G. Daniel via DotNetMonster.com
4/15/2005 7:46:11 PM
can anybody help me??
using the mouse i let the user to draw a shape about a set of points, i
want to define the points enclosed within this shape, the shape is
irregular, i have saved all the points of that shape (which are defined by
the mousedown event), the shape is not completely continous (due to moving
the mouse very fast) but it is closed.

if any body have any idea even if it is not completly correct, please
support it, it may help me alot

thanx

--
Salvador
4/16/2005 4:09:24 PM
Hi,

The message is clear but what is not clear is the question, are you asking
how to draw it? If so you can use GDI+ functions to draw the lines based on
an array of points.

I have done an application before that when the mouse move was forcing a
repaint with the last point based on the mouse hotspot so you can easily draw
irregular shapes.

GDI+ functions are stored on the System.Drawing namespace.

Hope this helps
Salva


[quoted text, click to view]
AddThis Social Bookmark Button