I'm having a problem drawing this graphic:
For some reason I'm getting two points instead of just the one.
The code for it:
If I comment out the point part the shape is correct, jut a rounded rectangle with no points. What am I doing that is causing the wrong point?
-I hate Microsoft!
-Forever and always forward.
-My kingdom for a edit button!
For some reason I'm getting two points instead of just the one.
The code for it:
Code:
Private Function RoundedPoint(ByVal Rect As Rectangle, ByVal CornerSize As Integer) As GraphicsPath
Dim _GraphicsPath As New Drawing2D.GraphicsPath()
_GraphicsPath.AddArc(New Rectangle(40, 0, CornerSize, CornerSize), 180, 90)
_GraphicsPath.AddLine(CornerSize, 0, (Rect.Width + 40) - CornerSize, 0)
_GraphicsPath.AddArc(New Rectangle(Rect.Width - CornerSize, 0, CornerSize, CornerSize), -90, 90)
_GraphicsPath.AddLine(Rect.Width, CornerSize, (Rect.Width + 40), Rect.Height - CornerSize)
_GraphicsPath.AddArc(New Rectangle(Rect.Width - CornerSize, Rect.Height - CornerSize, CornerSize, CornerSize), 0, 90)
_GraphicsPath.AddLine((Rect.Width + 40) - CornerSize, Rect.Height, CornerSize, Rect.Height)
_GraphicsPath.AddArc(New Rectangle(40, Rect.Height - CornerSize, CornerSize, CornerSize), 90, 90)
'Create Point
Dim CenterPoint As Point = New Point(Rect.X, Rect.Height / 2)
Dim Point3 As Integer = Rect.Height / 3
_GraphicsPath.AddLine(40, Rect.Height - Point3, 0, CenterPoint.Y)
_GraphicsPath.AddLine(0, CenterPoint.Y, 40, Point3)
Return _GraphicsPath
End Function
-I hate Microsoft!
-Forever and always forward.
-My kingdom for a edit button!