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 {
11531153 }
11541154 }
11551155
1156- drawShader ( ctx ) {
1156+ drawShader ( ctx , shouldStrkedPath = true ) {
11571157 if ( this . shader instanceof LinearGradient ) {
11581158 const color = UIColor . clearColor ;
11591159 CGContextSetFillColorWithColor ( ctx , color . CGColor ) ;
@@ -1162,7 +1162,7 @@ export class Paint implements IPaint {
11621162 const options = g . tileMode === TileMode . CLAMP ? CGGradientDrawingOptions . kCGGradientDrawsBeforeStartLocation | CGGradientDrawingOptions . kCGGradientDrawsAfterEndLocation : 0 ;
11631163 // const path = CGContextCopyPath(ctx);
11641164 CGContextSaveGState ( ctx ) ;
1165- if ( this . style === Style . STROKE ) {
1165+ if ( shouldStrkedPath && this . style === Style . STROKE ) {
11661166 CGContextReplacePathWithStrokedPath ( ctx ) ;
11671167 }
11681168 CGContextClip ( ctx ) ;
@@ -1808,7 +1808,7 @@ export class Canvas implements ICanvas {
18081808 } else {
18091809 CGContextAddPath ( ctx , path ) ;
18101810 }
1811- paint . drawShader ( ctx ) ;
1811+ paint . drawShader ( ctx , false ) ;
18121812 } else {
18131813 if ( bPath ) {
18141814 bPath . lineWidth = paint . strokeWidth ;
You can’t perform that action at this time.
0 commit comments