File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -1153,7 +1153,7 @@ export class Paint implements IPaint {
1153
1153
}
1154
1154
}
1155
1155
1156
- drawShader ( ctx ) {
1156
+ drawShader ( ctx , shouldStrkedPath = true ) {
1157
1157
if ( this . shader instanceof LinearGradient ) {
1158
1158
const color = UIColor . clearColor ;
1159
1159
CGContextSetFillColorWithColor ( ctx , color . CGColor ) ;
@@ -1162,7 +1162,7 @@ export class Paint implements IPaint {
1162
1162
const options = g . tileMode === TileMode . CLAMP ? CGGradientDrawingOptions . kCGGradientDrawsBeforeStartLocation | CGGradientDrawingOptions . kCGGradientDrawsAfterEndLocation : 0 ;
1163
1163
// const path = CGContextCopyPath(ctx);
1164
1164
CGContextSaveGState ( ctx ) ;
1165
- if ( this . style === Style . STROKE ) {
1165
+ if ( shouldStrkedPath && this . style === Style . STROKE ) {
1166
1166
CGContextReplacePathWithStrokedPath ( ctx ) ;
1167
1167
}
1168
1168
CGContextClip ( ctx ) ;
@@ -1808,7 +1808,7 @@ export class Canvas implements ICanvas {
1808
1808
} else {
1809
1809
CGContextAddPath ( ctx , path ) ;
1810
1810
}
1811
- paint . drawShader ( ctx ) ;
1811
+ paint . drawShader ( ctx , false ) ;
1812
1812
} else {
1813
1813
if ( bPath ) {
1814
1814
bPath . lineWidth = paint . strokeWidth ;
You can’t perform that action at this time.
0 commit comments