I'm building a collection of CustomEndCaps to use with Pens to draw various lines and vectors in my application.
I have one CustomEndCap that I just call "Circle" and it looks like so:
When I use this endcap on the line the end of the line is the center of the circle and if I fill the circle, it fills in solid, as if a solid circle shape is drawn over the end of the line. This is what I want.
I have another CustomEndCap called "Triangle" and it looks something like this:
In this case the point of the triangle starts at the end of the line. If I try to fill this one, for some reason, it doesn't fill in solid like the circle. The underlying line that runs through the center of the triangle is treated like an XOR fill. What do I have to do to get the polygon shape to fill in solid just like the ellipse?
I have one CustomEndCap that I just call "Circle" and it looks like so:
VB.NET:
r = 3
path.AddEllipse(New Rectangle(-r, -r, r * 2, r * 2))
[SIZE=2]CustCap = [/SIZE][SIZE=2][COLOR=#0000ff]New[/COLOR][/SIZE][SIZE=2] Drawing2D.CustomLineCap(path, [/SIZE][SIZE=2][COLOR=#0000ff]Nothing[/COLOR][/SIZE][SIZE=2])
[/SIZE]
When I use this endcap on the line the end of the line is the center of the circle and if I fill the circle, it fills in solid, as if a solid circle shape is drawn over the end of the line. This is what I want.
I have another CustomEndCap called "Triangle" and it looks something like this:
VB.NET:
ReDim Points(0 To 2)
Points(0) = New PointF(0, 0)
Points(1) = New PointF(3, -5)
Points(2) = New PointF(-3, -5)
path.AddPolygon(Points)
[SIZE=2]CustCap = [/SIZE][SIZE=2][COLOR=#0000ff]New[/COLOR][/SIZE][SIZE=2] Drawing2D.CustomLineCap(path, [/SIZE][SIZE=2][COLOR=#0000ff]Nothing[/COLOR][/SIZE][SIZE=2])
[/SIZE]
In this case the point of the triangle starts at the end of the line. If I try to fill this one, for some reason, it doesn't fill in solid like the circle. The underlying line that runs through the center of the triangle is treated like an XOR fill. What do I have to do to get the polygon shape to fill in solid just like the ellipse?