You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There doesn't seem to be a way to import external vector assets and use them with compose. Would it be necessary to write an e.g. SVG to Compose parser to implement this?
The text was updated successfully, but these errors were encountered:
a) there was recently a discussion about a SVG parser on discourse
b) not all SVG elements have counterparts in Compose right now, so some intermediate steps might be needed.
c) with Rsvg+Cairo you could get to a simple CairoScript notation that would be easier to parse (it's a few key words and numbers)
using Rsvg
using Cairo
io = IOBuffer()
cs = CairoScriptSurface(io,500.0,500.0)
r = Rsvg.handle_new_from_file("../.julia/dev/Rsvg/data/star.svg")
c = Cairo.CairoContext(cs)
Rsvg.handle_render_cairo(c,r)
seek(io,0)
println(String(read(io)))
outputs
julia> include("rsvgscript.jl")
%!CairoScript
<< /content //COLOR_ALPHA /width 500 /height 500 >> surface context
n 168.894531 190.628906 m 113.09375 137.539062 l 61.144531 194.402344 l 79.21875 119.53125 l 4 102.972656 l 77.878906 81.195312 l 54.609375 7.773438 l 110.410156 60.863281 l 162.359375 4 l 144.28125 78.871094 l 219.5 95.429688 l 145.625 117.207031 l h 168.894531 190.628906 m
fill+
0.501961 0 0 rgb set-source
8 set-line-width
4 set-miter-limit
stroke+
There doesn't seem to be a way to import external vector assets and use them with compose. Would it be necessary to write an e.g. SVG to Compose parser to implement this?
The text was updated successfully, but these errors were encountered: