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

How to draw svg and images using react-canvaskit #41

Open
xurenda opened this issue Jul 22, 2021 · 6 comments
Open

How to draw svg and images using react-canvaskit #41

xurenda opened this issue Jul 22, 2021 · 6 comments

Comments

@xurenda
Copy link

xurenda commented Jul 22, 2021

I want to draw svg and images on canvas, it seems react-canvaskit does not provide these functions, is there any way?

@Zubnix
Copy link
Collaborator

Zubnix commented Jul 23, 2021

It's certianly possible but it seems react-canvaskit doesn't to have that api mapped from canvaskit. I'll see if I can update the canvaskit dependency and add image support.

@Zubnix
Copy link
Collaborator

Zubnix commented Jul 23, 2021

work is being done in https://github.com/udevbe/react-canvaskit/tree/canvaskit-wasm-update
All but offscreen rendering is working, once that is done, I'll add image support.

@xurenda
Copy link
Author

xurenda commented Jul 23, 2021

OK, thank you. Looking forward to your updates.

@boulabiar
Copy link

work is being done in https://github.com/udevbe/react-canvaskit/tree/canvaskit-wasm-update All but offscreen rendering is working, once that is done, I'll add image support.

I've just discovered this excellent repo, is there any example for current svg support ?

@Zubnix
Copy link
Collaborator

Zubnix commented Jan 7, 2022

Unfortunately most of my time is currently spend developing greenfield.

I'll see if I can continue and fix up the upgrade branch and add basic image support in the next few days.

@Zubnix
Copy link
Collaborator

Zubnix commented Jan 10, 2022

I've added encoded image support (tested with png). SVG images don't seem to be supported by canvaskit, only individual SVG paths.

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

3 participants