VCV Rack API v2
Loading...
Searching...
No Matches
rack::window::Svg Struct Reference

Scalable Vector Graphics document. More...

#include <Svg.hpp>

Public Member Functions

 ~Svg ()
 
void loadFile (const std::string &filename)
 Don't call this directly.
 
void loadString (const std::string &str)
 Loads SVG data from a string.
 
math::Vec getSize ()
 Returns the SVG page size in pixels.
 
int getNumShapes ()
 
int getNumPaths ()
 
int getNumPoints ()
 
void draw (NVGcontext *vg)
 

Static Public Member Functions

static std::shared_ptr< Svgload (const std::string &filename)
 Loads Svg from a cache.
 

Public Attributes

NSVGimage * handle = NULL
 

Detailed Description

Scalable Vector Graphics document.

Constructor & Destructor Documentation

◆ ~Svg()

rack::window::Svg::~Svg ( )

Member Function Documentation

◆ loadFile()

void rack::window::Svg::loadFile ( const std::string & filename)

Don't call this directly.

Use Svg::load() for caching.

◆ loadString()

void rack::window::Svg::loadString ( const std::string & str)

Loads SVG data from a string.

◆ getSize()

math::Vec rack::window::Svg::getSize ( )

Returns the SVG page size in pixels.

◆ getNumShapes()

int rack::window::Svg::getNumShapes ( )

◆ getNumPaths()

int rack::window::Svg::getNumPaths ( )

◆ getNumPoints()

int rack::window::Svg::getNumPoints ( )

◆ draw()

void rack::window::Svg::draw ( NVGcontext * vg)

◆ load()

static std::shared_ptr< Svg > rack::window::Svg::load ( const std::string & filename)
static

Loads Svg from a cache.

Member Data Documentation

◆ handle

NSVGimage* rack::window::Svg::handle = NULL

The documentation for this struct was generated from the following file: