ui-canvas
ui-canvas copied to clipboard
Missing support for drawImage with Matrix on iOS
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.
@stemyke should be working in 4.0.46 (in drawBitmap not drawImage !)
@farfromrefug You are right, I wrote the issue in a hurry, but thanks for quick response :)