question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

How can I use SkSVG backend?

See original GitHub issue

Tag: Question

I see there is a way to render SVG to a Canvas with Skija, like:

val svg = Data.makeFromBytes(…SVG…)
val dom = DOM(svg)

dom.render(canvas)

But is it possible to output SVG from Skija using SkSVG backend?

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
tonskycommented, Feb 16, 2021

Yeah, SkWStream would be a really tricky part. Ideally it should be converted to OutputStream on Java side, but there’s no precedent yet in Skija repo. I might look into it myself.

*.cc are hand-written. There’s a tool in java distro that can generate function headers from native method definitions in java classes, but I don’t use it. It’s pretty straightforward.

1reaction
tonskycommented, Feb 14, 2021

Seems like SkSVGCanvas is whay you need. There’s no JVM bindings for that yet, but should be easy to add. https://github.com/google/skia/blob/master/include/svg/SkSVGCanvas.h

Read more comments on GitHub >

github_iconTop Results From Across the Web

<use> - SVG: Scalable Vector Graphics - MDN Web Docs
The <use> element takes nodes from within the SVG document, and duplicates them somewhere else. Example.
Read more >
Using SVG | CSS-Tricks
SVG is an image format for vector graphics. It literally means Scalable Vector Graphics. Basically, what you work with in Adobe Illustrator.
Read more >
Diagrams.Backend.SVG - Hackage
A full-featured rendering backend for diagrams producing SVG files, implemented natively in Haskell (making it easy to use on any platform).
Read more >
SVG Tutorial – How to Code Images with 7 Examples
Since HTML5, we can include the code of an SVG image inside an HTML document. We don't even need to use the image...
Read more >
Using SVG and Vue.js: A complete guide - LogRocket Blog
Scalable Vector Graphics (SVG) is one of the most useful and versatile tools at a frontend developer's disposal. With SVG, we can have...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found