Skip to content

Commit 817d57e

Browse files
author
farfromrefug
committed
chore: refactor
1 parent e17f9f9 commit 817d57e

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

src/ui-canvas/canvas.ios.ts

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1452,14 +1452,15 @@ export class Canvas implements ICanvas {
14521452

14531453
setMatrix(matrix: Matrix): void {
14541454
// TODO: Find a better way to implement matrix set
1455+
const ctx = this.ctx;
14551456
const density = Screen.mainScreen.scale;
14561457
const currentMatrix = this.getMatrix();
14571458
const invertedTransform = CGAffineTransformInvert(currentMatrix.mTransform);
1458-
const scaleTransform = CGAffineTransformMake(density, 0, 0, -density, 0, density * this.getHeight());
1459+
const scaleTransform = CGAffineTransformMake(density, 0, 0, -density, 0, density * this.mHeight);
14591460

1460-
CGContextConcatCTM(this.ctx, invertedTransform);
1461-
CGContextConcatCTM(this.ctx, scaleTransform);
1462-
CGContextConcatCTM(this.ctx, matrix.mTransform);
1461+
CGContextConcatCTM(ctx, invertedTransform);
1462+
CGContextConcatCTM(ctx, scaleTransform);
1463+
CGContextConcatCTM(ctx, matrix.mTransform);
14631464
}
14641465
getMatrix(): Matrix {
14651466
return new Matrix(CGContextGetCTM(this.ctx));

0 commit comments

Comments
 (0)