File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -732,8 +732,19 @@ class Renderer2D extends Renderer {
732732
733733 const currentTransform = this . drawingContext . getTransform ( ) ;
734734 const initialClip = this . initialClipTransform ;
735- const relativeTransform = initialClip . multiply ( currentTransform ) ;
736- this . clipPath . addPath ( tempPath , relativeTransform ) ;
735+ if ( currentTransform . a < 0 || currentTransform . d < 0 ) {
736+ const fixedTransform = new DOMMatrix ( [
737+ Math . abs ( currentTransform . a ) , currentTransform . b ,
738+ currentTransform . c , Math . abs ( currentTransform . d ) ,
739+ currentTransform . e , currentTransform . f
740+ ] ) ;
741+ const relativeTransform = initialClip . multiply ( fixedTransform ) ;
742+ this . clipPath . addPath ( tempPath , relativeTransform ) ;
743+ } else {
744+ // Normal case
745+ const relativeTransform = initialClip . multiply ( currentTransform ) ;
746+ this . clipPath . addPath ( tempPath , relativeTransform ) ;
747+ }
737748 } else {
738749 // Normal drawing (existing code)
739750 ctx . beginPath ( ) ;
You can’t perform that action at this time.
0 commit comments