Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing support for drawImage with Matrix on iOS #31

Open
stemyke opened this issue Feb 18, 2021 · 2 comments
Open

Missing support for drawImage with Matrix on iOS #31

stemyke opened this issue Feb 18, 2021 · 2 comments

Comments

@stemyke
Copy link

stemyke commented Feb 18, 2021

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.

@farfromrefug
Copy link
Member

@stemyke should be working in 4.0.46 (in drawBitmap not drawImage !)

@stemyke
Copy link
Author

stemyke commented Feb 18, 2021

@farfromrefug You are right, I wrote the issue in a hurry, but thanks for quick response :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants