NanoVG bindings.
NanoVG bindings.
class nvg::Texture
Represents a texture for the NanoVG API.
class nvg::Paint
A paint style that can be used as a fill or a stroke.
Texture@ nvg::LoadTexture(const string&in filename, int flags = 0)
Load a texture for the NanoVG API.
nvg::Texture@ Texture@ nvg::LoadTexture(MemoryBuffer&in buffer, int flags = 0)
Load a texture for the NanoVG API from a memory buffer.
nvg::Texture@ int nvg::LoadFont(const string&in filename, bool fallbackIcons = false, bool fallbackArial = false)
Load a font for use in the NanoVG API.
int mat3 nvg::CurrentTransform()
mat3 Paint nvg::LinearGradient(const vec2&in start, const vec2&in end, const vec4&in color1, const vec4&in color2)
nvg::Paint Paint nvg::BoxGradient(float x, float y, float w, float h, float r, float f, const vec4&in color1, const vec4&in color2)
nvg::Paint Paint nvg::BoxGradient(const vec2&in pos, const vec2&in size, float r, float f, const vec4&in color1, const vec4&in color2)
nvg::Paint Paint nvg::RadialGradient(const vec2&in center, float inr, float outr, const vec4&in color1, const vec4&in color2)
nvg::Paint Paint nvg::TexturePattern(const vec2&in origin, const vec2&in size, float angle, Texture@ texture, float alpha)
nvg::Paint float nvg::Text(float x, float y, const string&in str)
Draws text using the current font settings.
float float nvg::Text(const vec2&in pos, const string&in str)
Draws text using the current font settings.
float void nvg::TextBox(float x, float y, float w, const string&in str)
Draws text inside of a word wrapping box using the current font settings.
void nvg::TextBox(const vec2&in pos, float w, const string&in str)
Draws text inside of a word wrapping box using the current font settings.
vec2 nvg::TextBounds(const string&in str)
Measures the size of the given text using the current font settings.
vec2 vec2 nvg::TextBoxBounds(float w, const string&in str)
Measures the size of the given text inside of a word wrapping box using the current font settings.
vec2 enum nvg::TextureFlags
Flags to use when loading NanoVG textures.