We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
having the option to insert "raw" child elements from string would be convenient
example:
fun generateSVG( shapeViewBox: String = "0 0 100 100", shapeContent: String = """<path d="M0 13.3333C0 5.96954 5.96954 0 13.3333 0H86.6667C94.0305 0 100 5.96954 100 13.3333V86.6667C100 94.0305 94.0305 100 86.6667 100H13.3333C5.96954 100 0 94.0305 0 86.6667V13.3333Z" fill="currentColor"/>""" ): String { val svg = SVG.svg { /* ...*/ children += SVG.svg { id = "shape" width = "100%" height = "100%" attributes["x"] = "0" attributes["y"] = "0" viewBox = shapeViewBox body = "replace_shape" } } return buildString { svg.render(this, RenderMode.INLINE) }.replace("replace_shape", "\n" +shapeContent + "\n") }
i recently came across a problem in which i was given raw svg paths and viewport of a SVG and had to assemble nested SVGs out of them
i solved it by assigning a "replace_thing" value to tthe body of the nested SVGs and did some string manipulation on the rendered output
"replace_thing"
regardless.. a nicer api would make this type of problem easier to solve
The text was updated successfully, but these errors were encountered:
No branches or pull requests
having the option to insert "raw" child elements from string would be convenient
example:
i recently came across a problem in which i was given raw svg paths and viewport of a SVG and had to assemble nested SVGs out of them
i solved it by assigning a
"replace_thing"
value to tthe body of the nested SVGs and did some string manipulation on the rendered outputregardless.. a nicer api would make this type of problem easier to solve
The text was updated successfully, but these errors were encountered: