@@ -18,7 +18,7 @@ public abstract class DrawAttribute
1818 int _x , _y , _x1 , _y1 = 0 ;
1919
2020 private bool _isRelative ;
21- public bool IsRelative { get => _isRelative ; protected set => _isRelative = value ; }
21+ public bool IsRelative { get => _isRelative ; set => _isRelative = value ; }
2222 public int Y1 { get => _y1 ; set => _y1 = value ; }
2323 public int X1 { get => _x1 ; set => _x1 = value ; }
2424 public int X { get => _x ; set => _x = value ; }
@@ -47,6 +47,7 @@ public abstract class DrawAttribute
4747 /// </summary>
4848 public class MoveTo : DrawAttribute
4949 {
50+ public MoveTo ( ) { }
5051 /// <summary>
5152 /// Moving the current point to another point.
5253 /// </summary>
@@ -102,6 +103,7 @@ public override void UpdateLast()
102103 /// </summary>
103104 public class LineTo : DrawAttribute
104105 {
106+ public LineTo ( ) { }
105107 /// <summary>
106108 /// Use to draw a straight line from the current point to the given point.
107109 /// </summary>
@@ -182,6 +184,7 @@ public override void UpdateLast()
182184 /// </summary>
183185 public class HorizontalLineTo : DrawAttribute
184186 {
187+ public HorizontalLineTo ( ) { }
185188 /// <summary>
186189 /// Use to draw a horizontal line from the current point to the given point.
187190 /// </summary>
@@ -253,6 +256,7 @@ public override void UpdateLast()
253256 /// </summary>
254257 public class VerticalLineTo : DrawAttribute
255258 {
259+ public VerticalLineTo ( ) { }
256260 /// <summary>
257261 /// Use to draw a vertical line from the current point to the given point.
258262 /// </summary>
@@ -333,6 +337,7 @@ public class CurveTo : DrawAttribute
333337 public int X2 { get => _x2 ; set => _x2 = value ; }
334338 public int Y2 { get => _y2 ; set => _y2 = value ; }
335339
340+ public CurveTo ( ) { }
336341 /// <summary>
337342 /// Use to draw a cubic Bézier curve from the current point to the given point.
338343 /// </summary>
@@ -489,6 +494,7 @@ public class SmoothCurveTo : DrawAttribute
489494 public int X2 { get => _x2 ; set => _x2 = value ; }
490495 public int Y2 { get => _y2 ; set => _y2 = value ; }
491496
497+ public SmoothCurveTo ( ) { }
492498 /// <summary>
493499 /// Use to draw a smooth cubic Bézier curve from the current point to the given point.
494500 /// </summary>
@@ -497,6 +503,7 @@ public class SmoothCurveTo : DrawAttribute
497503 /// <param name="x">end point x</param>
498504 /// <param name="y">end point y</param>
499505 /// <param name="isRelative">if true, the points becames relatives to the last point</param>
506+
500507 public SmoothCurveTo ( Group x2 , Group y2 , Group x , Group y , bool isRelative = false ) : this ( Convert . ToInt32 ( x2 . Value ) , Convert . ToInt32 ( y2 . Value ) , Convert . ToInt32 ( x . Value ) , Convert . ToInt32 ( y . Value ) , isRelative ) { }
501508 /// <summary>
502509 /// Use to draw a smooth cubic Bézier curve from the current point to the given point.
@@ -629,6 +636,7 @@ public override void UpdateLast()
629636 /// </summary>
630637 public class QuadraticBezierCurveTo : DrawAttribute
631638 {
639+ public QuadraticBezierCurveTo ( ) { }
632640 /// <summary>
633641 /// Use to draw a quadratic Bézier curve.
634642 /// </summary>
@@ -753,6 +761,7 @@ public override void UpdateLast()
753761 /// </summary>
754762 public class SmoothQuadraticBezierCurveTo : DrawAttribute
755763 {
764+ public SmoothQuadraticBezierCurveTo ( ) { }
756765 /// <summary>
757766 /// Use to draw a smooth quadratic Bézier curve.
758767 /// </summary>
@@ -878,6 +887,7 @@ public class EllipticalArc : DrawAttribute
878887 bool _largeArcFlag ;
879888 bool _sweepFlag ;
880889
890+ public EllipticalArc ( ) { }
881891 /// <summary>
882892 /// Use to draw an ellipse.
883893 /// </summary>
@@ -889,6 +899,7 @@ public class EllipticalArc : DrawAttribute
889899 /// <param name="x">new current point x</param>
890900 /// <param name="y">new current point y</param>
891901 /// <param name="isRelative">if true, the points becames relatives to the last point</param>
902+
892903 public EllipticalArc ( Group rx , Group ry , Group angle , Group largeArcFlag , Group sweepFlag , Group x , Group y , bool isRelative = false ) : this ( Convert . ToInt32 ( rx . Value ) , Convert . ToInt32 ( ry . Value ) , Convert . ToInt32 ( angle . Value ) , Convert . ToInt32 ( largeArcFlag . Value ) == 0 ? false : true , Convert . ToInt32 ( sweepFlag . Value ) == 0 ? false : true , Convert . ToInt32 ( x . Value ) , Convert . ToInt32 ( y . Value ) , isRelative ) { }
893904 /// <summary>
894905 /// Use to draw an ellipse.
@@ -949,11 +960,10 @@ public override void UpdateLast()
949960 /// </summary>
950961 public class ClosePath : DrawAttribute
951962 {
963+ public ClosePath ( ) { }
952964 /// <summary>
953965 /// Draw a straight line from the current position to the first point in the path.
954966 /// </summary>
955- public ClosePath ( ) { }
956-
957967 public override List < Vector2i > GetSelectablePoints ( )
958968 {
959969 throw new NotImplementedException ( ) ;
0 commit comments