Skip to content

Missing support for drawImage with Matrix on iOS #31

Open
@stemyke

Description

@stemyke

Make sure to check the demo app(s) for sample usage

Checked.

Make sure to check the existing issues in this repository

Checked.

If the demo apps cannot help and there is no issue for your problem, tell us about it

Please, ensure your title is less than 63 characters long and starts with a capital
letter.

Which platform(s) does your issue occur on?

  • iOS
  • emulator and device.

Is there any code involved?

I think this code snippet or something similar should do the job.

if (args[1] instanceof Matrix) {
CGContextConcatCTM(ctx, args[1]._transform);
CGContextTranslateCTM(ctx, 0, image.size.height);
CGContextScaleCTM(ctx, 1.0, -1.0);
CGContextDrawImage(ctx, CGRectMake(0, 0, image.size.width, image.size.height), image.CGImage);
return;
}

I wanted to create a pull request but I didn't know how to. I just tried to modify the canvas.ios.js code in my project's node_modules folder and it worked. @farfromrefug Can you please check it? It is urgent for my project to finish.

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