I want to draw a custom line cap – a equilateral triangle with the radius r. Apparently I can’t:
Dim triangleSide As Single = CSng(3 * r / Math.Sqrt(3))
Dim triangleHeight As Single = CSng(3 * r / 2)
path = New GraphicsPath()
Dim points() As PointF = New PointF() { _
New PointF(-triangleSide / 2, 0), _
New PointF(triangleSide / 2, 0), _
New PointF(0, triangleHeight) }
path.AddLines(points)
' Not Implemented Exception, Was is Das? '
_HlpCap = New CustomLineCap(path, Nothing)
Do I something wrong or it’s just a framework bug?
EDIT:
After Mark Cidade remark, I tried using (Nothing, path) and it helped, but I need to fill in the triangle, not only to stroke it out…
The exception comes from the GDI+ library returning a
NotImplementedstatus from itsGdipCreateCustomLineCap()function. Try passing a stroke path instead ofNothing: