Skip to content

Missing Matrix.mapPoints one parameter version iOS #32

@stemyke

Description

@stemyke

@farfromrefug Can you please modify the function this way in canvas.ios.ts?

public mapPoints(...args) {
        let src: number[];
        let dstIndex: number = 0,
            srcIndex: number = 0,
            pointCount: number;
        const pts: number[] = args[0];
        if (args.length <= 2) {
            src = args[args.length-1];
        } else {
            dstIndex = args[1] || 0;
            srcIndex = args[3] || 0;
            pointCount = args[4];
            src = args[2];
        }
        src = src || pts;
        pointCount = Math.floor(pointCount || src.length);
        for (let index = 0; index < pointCount; index += 2) {
            const cgPoint = CGPointApplyAffineTransform(CGPointMake(src[index + srcIndex], src[index + srcIndex + 1]), this._transform);
            pts[index + dstIndex] = cgPoint.x;
            pts[index + dstIndex + 1] = cgPoint.y;
        }
    }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions