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

drawImage(canvas, 0, 0) #30

Open
2xAA opened this issue Nov 11, 2015 · 2 comments
Open

drawImage(canvas, 0, 0) #30

2xAA opened this issue Nov 11, 2015 · 2 comments

Comments

@2xAA
Copy link

2xAA commented Nov 11, 2015

Official Canvas supports using the Canvas as an Image using context.drawImage.
Is there a possibility to do this with this library?

I'm not specifically asking for it to be added, just the theory behind it with either this library or OpenVG itself. I'd be more than happy working on implementing it myself.

From the MozDocs:
image
An element to draw into the context. The specification permits any canvas image source (CanvasImageSource), such as an HTMLImageElement, an HTMLVideoElement, an HTMLCanvasElement or an ImageBitmap.

I know this isn't an exact implementation, but there's any possibility to emulate this, it would be awesome.

Best,
Sam

@eendeego
Copy link
Owner

Yes, it can be done. OpenVG has an api to copy images from the framebuffer to a "memory" backed image.

Patches are welcome!

@2xAA
Copy link
Author

2xAA commented Nov 20, 2015

Well, I need this for a project I'm working on at University, so I'll get going on it and submit a pull request soon - thanks.

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