Vital.sandbox
SVG

svg.create_from_raw

Client

Creates a new SVG instance from a raw SVG string


Syntax

local instance = svg.create_from_raw(raw)

Parameters

TypeNameDescription
stringrawRaw SVG markup string

Returns

TypeNameDescription
svginstanceCreated SVG instance

Examples

Create an SVG instance from raw markup
local icon = svg.create_from_raw([[
    <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100">
        <circle cx="50" cy="50" r="50"/>
    </svg>
]])

On this page