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 @@ -1857,11 +1857,9 @@ export class Canvas implements ICanvas {
1857
1857
CGContextSetBlendMode ( context , CGBlendMode . kCGBlendModeNormal ) ;
1858
1858
1859
1859
// draw original image
1860
- CGContextSaveGState ( context ) ;
1861
1860
CGContextTranslateCTM ( context , 0 , source . size . height ) ;
1862
1861
CGContextScaleCTM ( context , 1.0 , - 1.0 ) ;
1863
1862
CGContextDrawImage ( context , rect , source . CGImage ) ;
1864
- CGContextRestoreGState ( context ) ;
1865
1863
1866
1864
return context ;
1867
1865
}
@@ -1882,7 +1880,9 @@ export class Canvas implements ICanvas {
1882
1880
colorSpace ,
1883
1881
CGImageAlphaInfo . kCGImageAlphaPremultipliedLast
1884
1882
) ;
1885
- CGContextScaleCTM ( context , 1 / scaleFactor , 1 / scaleFactor ) ;
1883
+
1884
+ CGContextTranslateCTM ( context , 0 , h ) ;
1885
+ CGContextScaleCTM ( context , 1 / scaleFactor , - 1 / scaleFactor ) ;
1886
1886
CGColorSpaceRelease ( colorSpace ) ; // 6
1887
1887
return context ; // 7
1888
1888
}
You can’t perform that action at this time.
0 commit comments