Draw SVG directly to html canvas

sourav mandal
1 min readJan 13, 2019

--

two simple functions to draw svg directly to html canvas.

first drawSvg() function can be used in game draw() loops because it doesn’t wait for the image to load!

the second function drawSvg2() can be used if your are getting the svg from network because it waits for the image to load.

Sign up to discover human stories that deepen your understanding of the world.

Free

Distraction-free reading. No ads.

Organize your knowledge with lists and highlights.

Tell your story. Find your audience.

Membership

Read member-only stories

Support writers you read most

Earn money for your writing

Listen to audio narrations

Read offline with the Medium app

--

--

sourav mandal
sourav mandal

Written by sourav mandal

just a coder who forgets things so makes blogs so he can remember later

No responses yet

Write a response