class

NanoSVG::Parser

Inherits Reference < Object

Constants

ALIGN_MAX = 2
ALIGN_MEET = 1
ALIGN_MID = 1
ALIGN_MIN = 0

preserveAspectRatio alignment

ALIGN_NONE = 0
ALIGN_SLICE = 2
EPSILON = 1e-12
KAPPA90 = 0.5522847493_f32
MAX_ATTR = 128
MAX_CLASSES = 32
MAX_DASHES = 8
PI = 3.14159265358979323846264338327_f32
SQRT2F = (Math.sqrt(2.0)).to_f32
XML_MAX_ATTRIBS = 256

Constructors

Class methods

encode_paint_order(a : UInt8, b : UInt8, c : UInt8) : UInt8
Source
parse(input : String, units : String = "px", dpi : Float32 = 96.0_f32) : Image

Parses an SVG from a string (does not modify the input).

Source

Instance methods

create_gradients
Source
dpi=(dpi : Float32)
Source
image
Source
image=(image : Image)
Source
parse_xml(input : String)
Source
resolve_pending_uses

Instantiates deferred <use> references whose defs appeared later in the document. Unresolvable references are dropped silently.

Source
scale_to_viewbox(units : String)
Source