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

Handles OS windowing, OpenGL, and NanoVG. More...

Classes

struct  Font
 Text font loaded in a particular Window context. More...
 
struct  Image
 Bitmap/raster image loaded in a particular Window context. More...
 
struct  Svg
 Scalable Vector Graphics document. More...
 
struct  Window
 OS window with OpenGL context. More...
 

Functions

float in2px (float in)
 Converts inch measurements to pixels.
 
math::Vec in2px (math::Vec in)
 
float mm2px (float mm)
 Converts millimeter measurements to pixels.
 
math::Vec mm2px (math::Vec mm)
 
void svgDraw (NVGcontext *vg, NSVGimage *svg)
 
PRIVATE void init ()
 
PRIVATE void destroy ()
 

Variables

DEPRECATED typedef Svg SVG
 
static const float SVG_DPI = 75.f
 Arbitrary DPI, standardized for Rack.
 
static const float MM_PER_IN = 25.4f
 

Detailed Description

Handles OS windowing, OpenGL, and NanoVG.

Function Documentation

◆ in2px() [1/2]

float rack::window::in2px ( float in)
inline

Converts inch measurements to pixels.

◆ in2px() [2/2]

math::Vec rack::window::in2px ( math::Vec in)
inline

◆ mm2px() [1/2]

float rack::window::mm2px ( float mm)
inline

Converts millimeter measurements to pixels.

◆ mm2px() [2/2]

math::Vec rack::window::mm2px ( math::Vec mm)
inline

◆ svgDraw()

void rack::window::svgDraw ( NVGcontext * vg,
NSVGimage * svg )

◆ init()

PRIVATE void rack::window::init ( )

◆ destroy()

PRIVATE void rack::window::destroy ( )

Variable Documentation

◆ SVG

DEPRECATED typedef Svg rack::window::SVG

◆ SVG_DPI

const float rack::window::SVG_DPI = 75.f
static

Arbitrary DPI, standardized for Rack.

◆ MM_PER_IN

const float rack::window::MM_PER_IN = 25.4f
static