support for line start and end cap
This commit is contained in:
@@ -112,7 +112,11 @@ 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}
|
||||
Dim p2 As New Pen(obj.OutlineColor, obj.OutlineThicknes) With {
|
||||
.DashStyle = obj.OutlineDashStyle,
|
||||
.StartCap = obj.LineStartCap,
|
||||
.EndCap = obj.LineEndCap
|
||||
}
|
||||
p2.Alignment = PenAlignment.Center
|
||||
Dim no As PointF = New PointF(e.X, e.Y)
|
||||
e.Graphics.DrawLine(p2, no, no + obj.Size)
|
||||
|
||||
@@ -19,6 +19,8 @@ Imports Newtonsoft.Json
|
||||
Public Property OutlineColor As Color = Color.DarkBlue
|
||||
Public Property OutlineThicknes As Single = 1
|
||||
Public Property OutlineDashStyle As DashStyle = DashStyle.Solid
|
||||
Public Property LineStartCap As LineCap = LineCap.Flat
|
||||
Public Property LineEndCap As LineCap = LineCap.Flat
|
||||
<JsonProperty>
|
||||
Private _Text As String = ""
|
||||
Public Property TextPosition As TextPosition = TextPosition.FullCenter
|
||||
|
||||
Reference in New Issue
Block a user