module

Egui::NanoSvgCr

Constants

DPI = 96.0_f32

Class methods

image(source : String, tint : Color32) : NanoSVG::Image | Nil

Parsed (viewBox applied, currentColor resolved) image, or nil for a source NanoSVG cannot give an intrinsic size.

Source
prepare(source : String, tint : Color32) : String

Shared pre-bake rewrite (the C backend runs it too): resolve currentColor to the tint, then the gradient-coordinate fix.

Source
rasterize(source : String, tint : Color32, w : Int32, h : Int32) : Bytes | Nil

Rasterize source into a w×h straight-alpha RGBA8 bitmap (same fit as the C backend: aspect preserved, centered — <img> object-fit), or nil when the source is unusable.

Source