File tree Expand file tree Collapse file tree 3 files changed +12
-6
lines changed Expand file tree Collapse file tree 3 files changed +12
-6
lines changed Original file line number Diff line number Diff line change @@ -426,6 +426,8 @@ public class Arc : Shape
426426
427427 shpType = arc;
428428 innerRadius = 0 ;
429+ stroke.cap = round;
430+ stroke.width = 10 ;
429431
430432public :
431433 property Pointf center
Original file line number Diff line number Diff line change @@ -57,6 +57,8 @@ struct TesselatedShape
5757 bool partialSector = false , fullSector = false ;
5858 uint count = 0 ;
5959 Array<Array<Pointf>> inner = null ;
60+ Stroke stroke = shp.stroke ;
61+ LineCap cap = stroke.cap ;
6062
6163 switch (shp.shpType )
6264 {
@@ -67,6 +69,7 @@ struct TesselatedShape
6769 nodes = tmpNodes.array ;
6870 nodes[0 ] = dot.point ;
6971 count = 1 ;
72+ if (cap == flat) cap = square;
7073 break ;
7174 }
7275 case ShapeType::path:
@@ -196,8 +199,6 @@ struct TesselatedShape
196199 }
197200
198201 {
199- Stroke stroke = shp.stroke ;
200- LineCap cap = stroke.cap ;
201202 LineJoin join = stroke.join ;
202203 uint i, tc = count;
203204
@@ -221,6 +222,8 @@ struct TesselatedShape
221222 int inc = flip ? -1 : 1 ;
222223 uint ni = flip ? tc-1 : 0 ;
223224
225+ if (tc == 1 && lineWidth < 2 ) lineWidth = 2 ;
226+
224227 vCount = closed ? (tc * (rCount+1 )) : (2 *(capCount+1 ) + ((tc > 2 ) ? (tc-2 ) * (rCount+1 ) : 0 ));
225228 points = this .points = renew this .points Pointf[vCount];
226229
@@ -251,8 +254,6 @@ struct TesselatedShape
251254
252255 if (i == tc + (tc == 1 ) - 1 )
253256 end = true ;
254- if (i == tc)
255- i = 0 ;
256257
257258 {
258259 bool thisFlip = false , isCap = false ;
Original file line number Diff line number Diff line change @@ -370,8 +370,11 @@ class ButterburTest : Window
370370 Dot dot
371371 {
372372 //mge,
373- point = { 300, 300 };
374- stroke = { black, width = 20, cap = square };
373+ point = { 250, 300 };
374+ stroke = { black, width = 20,
375+ cap = round
376+ //cap = square
377+ };
375378 };
376379 GraphicalPresentation dotPresentation {/*gSurface*/ scene, graphic = dot };
377380
You can’t perform that action at this time.
0 commit comments