@@ -122,15 +122,15 @@ internal static void CalcGeometryAndBoundsWithTransform(StrokeNodeIterator itera
122
122
//insert a stroke node for the previous node
123
123
strokeNodePoints . Clear ( ) ;
124
124
strokeNode . GetPreviousContourPoints ( strokeNodePoints ) ;
125
- AddFigureToStreamGeometryContext ( context , strokeNodePoints , strokeNode . IsEllipse /*isBezierFigure*/ ) ;
125
+ AddFigureToStreamGeometryContext ( context , strokeNodePoints , isBezierFigure : strokeNode . IsEllipse ) ;
126
126
127
127
previousPreviousNodeRendered = true ;
128
128
}
129
129
130
130
//render the stroke node
131
131
strokeNodePoints . Clear ( ) ;
132
132
strokeNode . GetContourPoints ( strokeNodePoints ) ;
133
- AddFigureToStreamGeometryContext ( context , strokeNodePoints , strokeNode . IsEllipse /*isBezierFigure*/ ) ;
133
+ AddFigureToStreamGeometryContext ( context , strokeNodePoints , isBezierFigure : strokeNode . IsEllipse ) ;
134
134
}
135
135
136
136
if ( ! directionChanged )
@@ -176,7 +176,7 @@ internal static void CalcGeometryAndBoundsWithTransform(StrokeNodeIterator itera
176
176
}
177
177
178
178
//now render away!
179
- AddFigureToStreamGeometryContext ( context , connectingQuadPoints , false /* isBezierFigure*/ ) ;
179
+ AddFigureToStreamGeometryContext ( context , connectingQuadPoints , isBezierFigure : false ) ;
180
180
}
181
181
}
182
182
}
@@ -490,7 +490,7 @@ internal static void CalcGeometryAndBounds(StrokeNodeIterator iterator,
490
490
{
491
491
//render a complete first stroke node or we can get artifacts
492
492
prevPrevStrokeNode . GetContourPoints ( polyLinePoints ) ;
493
- AddFigureToStreamGeometryContext ( context , polyLinePoints , prevPrevStrokeNode . IsEllipse /*isBezierFigure*/ ) ;
493
+ AddFigureToStreamGeometryContext ( context , polyLinePoints , isBezierFigure : prevPrevStrokeNode . IsEllipse ) ;
494
494
polyLinePoints . Clear ( ) ;
495
495
}
496
496
@@ -565,7 +565,7 @@ internal static void CalcGeometryAndBounds(StrokeNodeIterator iterator,
565
565
{
566
566
//render a complete stroke node or we can get artifacts
567
567
prevStrokeNode . GetContourPoints ( polyLinePoints ) ;
568
- AddFigureToStreamGeometryContext ( context , polyLinePoints , prevStrokeNode . IsEllipse /*isBezierFigure*/ ) ;
568
+ AddFigureToStreamGeometryContext ( context , polyLinePoints , isBezierFigure : prevStrokeNode . IsEllipse ) ;
569
569
polyLinePoints . Clear ( ) ;
570
570
}
571
571
}
@@ -672,7 +672,7 @@ internal static void CalcGeometryAndBounds(StrokeNodeIterator iterator,
672
672
// we only have a single point to render
673
673
Debug . Assert ( pathFigureABSide . Count == 0 ) ;
674
674
prevPrevStrokeNode . GetContourPoints ( pathFigureABSide ) ;
675
- AddFigureToStreamGeometryContext ( context , pathFigureABSide , prevPrevStrokeNode . IsEllipse /*isBezierFigure*/ ) ;
675
+ AddFigureToStreamGeometryContext ( context , pathFigureABSide , isBezierFigure : prevPrevStrokeNode . IsEllipse ) ;
676
676
}
677
677
}
678
678
else if ( prevStrokeNode . IsValid && strokeNode . IsValid )
@@ -700,7 +700,7 @@ internal static void CalcGeometryAndBounds(StrokeNodeIterator iterator,
700
700
{
701
701
//render a complete stroke node or we can get artifacts
702
702
strokeNode . GetContourPoints ( polyLinePoints ) ;
703
- AddFigureToStreamGeometryContext ( context , polyLinePoints , strokeNode . IsEllipse /*isBezierFigure*/ ) ;
703
+ AddFigureToStreamGeometryContext ( context , polyLinePoints , isBezierFigure : strokeNode . IsEllipse ) ;
704
704
}
705
705
}
706
706
else
@@ -763,7 +763,7 @@ bool showFeedback
763
763
//we're between 100% and 70% overlapped
764
764
//just render two distinct figures with a connecting quad (if needed)
765
765
strokeNodePrevious . GetContourPoints ( pointBuffer1 ) ;
766
- AddFigureToStreamGeometryContext ( context , pointBuffer1 , strokeNodePrevious . IsEllipse /*isBezierFigure*/ ) ;
766
+ AddFigureToStreamGeometryContext ( context , pointBuffer1 , isBezierFigure : strokeNodePrevious . IsEllipse ) ;
767
767
768
768
Quad quad = strokeNodeCurrent . GetConnectingQuad ( ) ;
769
769
if ( ! quad . IsEmpty )
@@ -772,11 +772,11 @@ bool showFeedback
772
772
pointBuffer3 . Add ( quad . B ) ;
773
773
pointBuffer3 . Add ( quad . C ) ;
774
774
pointBuffer3 . Add ( quad . D ) ;
775
- AddFigureToStreamGeometryContext ( context , pointBuffer3 , false /* isBezierFigure*/ ) ;
775
+ AddFigureToStreamGeometryContext ( context , pointBuffer3 , isBezierFigure : false ) ;
776
776
}
777
777
778
778
strokeNodeCurrent . GetContourPoints ( pointBuffer2 ) ;
779
- AddFigureToStreamGeometryContext ( context , pointBuffer2 , strokeNodeCurrent . IsEllipse /*isBezierFigure*/ ) ;
779
+ AddFigureToStreamGeometryContext ( context , pointBuffer2 , isBezierFigure : strokeNodeCurrent . IsEllipse ) ;
780
780
}
781
781
else
782
782
{
@@ -867,21 +867,21 @@ private static void AddFigureToStreamGeometryContext(StreamGeometryContext conte
867
867
Debug . Assert ( points != null ) ;
868
868
Debug . Assert ( points . Count > 0 ) ;
869
869
870
- context . BeginFigure ( points [ points . Count - 1 ] , //start point
871
- true , //isFilled
872
- true ) ; //IsClosed
870
+ context . BeginFigure ( startPoint : points [ points . Count - 1 ] ,
871
+ isFilled : true ,
872
+ isClosed : true ) ;
873
873
874
874
if ( isBezierFigure )
875
875
{
876
876
context . PolyBezierTo ( points ,
877
- true , //isStroked
878
- true ) ; //isSmoothJoin
877
+ isStroked : true ,
878
+ isSmoothJoin : true ) ;
879
879
}
880
880
else
881
881
{
882
882
context . PolyLineTo ( points ,
883
- true , //isStroked
884
- true ) ; //isSmoothJoin
883
+ isStroked : true ,
884
+ isSmoothJoin : true ) ;
885
885
}
886
886
}
887
887
@@ -895,18 +895,18 @@ private static void AddPolylineFigureToStreamGeometryContext(StreamGeometryConte
895
895
Debug . Assert ( abPoints != null && dcPoints != null ) ;
896
896
Debug . Assert ( abPoints . Count > 0 && dcPoints . Count > 0 ) ;
897
897
898
- context . BeginFigure ( abPoints [ 0 ] , //start point
899
- true , //isFilled
900
- true ) ; //IsClosed
898
+ context . BeginFigure ( startPoint : abPoints [ 0 ] ,
899
+ isFilled : true ,
900
+ isClosed : true ) ;
901
901
902
902
context . PolyLineTo ( abPoints ,
903
- true , //isStroked
904
- true ) ; //isSmoothJoin
903
+ isStroked : true ,
904
+ isSmoothJoin : true ) ;
905
905
906
906
context . PolyLineTo ( dcPoints ,
907
- true , //isStroked
908
- true ) ; //isSmoothJoin
909
- }
907
+ isStroked : true ,
908
+ isSmoothJoin : true ) ;
909
+ }
910
910
911
911
/// <summary>
912
912
/// Private helper to render a path figure to the SGC
@@ -922,9 +922,9 @@ private static void AddArcToFigureToStreamGeometryContext(StreamGeometryContext
922
922
return ;
923
923
}
924
924
925
- context . BeginFigure ( abPoints [ 0 ] , //start point
926
- true , //isFilled
927
- true ) ; //IsClosed
925
+ context . BeginFigure ( startPoint : abPoints [ 0 ] ,
926
+ isFilled : true ,
927
+ isClosed : true ) ;
928
928
929
929
for ( int j = 0 ; j < 2 ; j ++ )
930
930
{
@@ -938,28 +938,28 @@ private static void AddArcToFigureToStreamGeometryContext(StreamGeometryContext
938
938
if ( polyLinePoints . Count > 0 )
939
939
{
940
940
//polyline first
941
- context . PolyLineTo ( polyLinePoints ,
942
- true , //isStroked
943
- true ) ; //isSmoothJoin
941
+ context . PolyLineTo ( polyLinePoints ,
942
+ isStroked : true ,
943
+ isSmoothJoin : true ) ;
944
944
polyLinePoints . Clear ( ) ;
945
945
}
946
946
//we're arcing, pull out height, width and the arc to point
947
947
Debug . Assert ( i + 2 < points . Count ) ;
948
948
if ( i + 2 < points . Count )
949
949
{
950
950
Point sizePoint = points [ i + 1 ] ;
951
- Size ellipseSize = new Size ( sizePoint . X / 2 /*width*/ , sizePoint . Y / 2 /*height*/ ) ;
951
+ Size ellipseSize = new Size ( width : sizePoint . X / 2 , height : sizePoint . Y / 2 ) ;
952
952
Point arcToPoint = points [ i + 2 ] ;
953
953
954
954
bool isLargeArc = false ; //>= 180
955
955
956
- context . ArcTo ( arcToPoint ,
957
- ellipseSize ,
958
- 0d , //rotation
959
- isLargeArc , // isLargeArc
960
- SweepDirection . Clockwise ,
961
- true , //isStroked
962
- true ) ; //isSmoothJoin
956
+ context . ArcTo ( arcToPoint ,
957
+ ellipseSize ,
958
+ rotationAngle : 0d ,
959
+ isLargeArc : isLargeArc ,
960
+ SweepDirection . Clockwise ,
961
+ isStroked : true ,
962
+ isSmoothJoin : true ) ;
963
963
}
964
964
i += 3 ; //advance past this arcTo block
965
965
}
@@ -974,8 +974,8 @@ private static void AddArcToFigureToStreamGeometryContext(StreamGeometryContext
974
974
{
975
975
//polyline
976
976
context . PolyLineTo ( polyLinePoints ,
977
- true , //isStroked
978
- true ) ; //isSmoothJoin
977
+ isStroked : true ,
978
+ isSmoothJoin : true ) ;
979
979
polyLinePoints . Clear ( ) ;
980
980
}
981
981
}
0 commit comments