add extended line cap configuration
This commit is contained in:
@@ -113,10 +113,21 @@ Public Class DefaultDrawMethodes
|
||||
Public Shared Sub DrawLine(e As PaintingObjectPaintEventArgs)
|
||||
Dim obj As PaintingObject = e.PaintingObject
|
||||
Dim p2 As New Pen(obj.OutlineColor, obj.OutlineThicknes) With {
|
||||
.DashStyle = obj.OutlineDashStyle,
|
||||
.StartCap = obj.LineStartCap,
|
||||
.EndCap = obj.LineEndCap
|
||||
.DashStyle = obj.OutlineDashStyle
|
||||
}
|
||||
|
||||
If obj.LineStartCap IsNot Nothing Then
|
||||
Dim args As LineCapConfigurationArgs = obj.LineStartCap.Configure
|
||||
p2.StartCap = args.LineCap
|
||||
p2.CustomStartCap = args.CustomLineCap
|
||||
End If
|
||||
|
||||
If obj.LineEndCap IsNot Nothing Then
|
||||
Dim args As LineCapConfigurationArgs = obj.LineEndCap.Configure
|
||||
p2.EndCap = args.LineCap
|
||||
p2.CustomEndCap = args.CustomLineCap
|
||||
End If
|
||||
|
||||
p2.Alignment = PenAlignment.Center
|
||||
Dim no As PointF = New PointF(e.X, e.Y)
|
||||
e.Graphics.DrawLine(p2, no, no + obj.Size)
|
||||
|
||||
Reference in New Issue
Block a user