8000 画图API bugfix · newcoderzhang/LuaViewSDK@329bcaa · GitHub
[go: up one dir, main page]

Skip to content

Commit 329bcaa

Browse files
author
城西
committed
画图API bugfix
1 parent ea935ab commit 329bcaa

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

IOS/LuaViewSDK/Classes/lvsdk/LVCanvas.m

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -427,13 +427,13 @@ static int canvas_drawArc (lv_State *L) {
427427

428428
-(void) drawImage:(UIImage*)image :(CGFloat)x :(CGFloat)y :(CGFloat)w :(CGFloat)h {
429429
if( _contentRef && image) {
430-
CGAffineTransform t1 = CGAffineTransformMake(1, self.skewY, self.skewX, 1, 0, 0);
430+
CGContextSaveGState(_contentRef);
431+
//CGAffineTransform t1 = CGAffineTransformMake(1, self.skewY, self.skewX, 1, 0, 0);
431432
CGAffineTransform t2 = CGAffineTransformMake(1, 0, 0, -1, 0, 0);
432433
//CGAffineTransform t3 = CGAffineTransformConcat(t1, t2);
433-
434434
CGContextConcatCTM(_contentRef, t2 );
435435
CGContextDrawImage(_contentRef, CGRectMake(x, -y-h , w, h), image.CGImage);
436-
CGContextConcatCTM(_contentRef, t1 );
436+
CGContextRestoreGState(_contentRef);
437437
}
438438
}
439439

0 commit comments

Comments
 (0)
0