When drawing a polygon, I place the points in an array and then draw it out. However what if you want to know the height and width of your polygon. One solution is to create a new GraphicsPath object from your array and then use the GetBounds.Width and GetBounds.Height call to get it.
Dim apolygon As New GraphicsPath
apolygon.AddPolygon(m_Points)
If (apolygon.GetBounds.Width >= 10 AndAlso apolygon.GetBounds.Height >= 10) Then
do something
m_Points is an array of points
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment