LMMS
Loading...
Searching...
No Matches
nanovg.c File Reference
#include <stdlib.h>
#include <stdio.h>
#include <math.h>
#include <memory.h>
#include "nanovg.h"
#include "fontstash.h"
#include "stb_image.h"

Go to the source code of this file.

Classes

struct  NVGstate
struct  NVGpoint
struct  NVGpathCache
struct  NVGfontContext
struct  NVGcontext

Macros

#define FONTSTASH_IMPLEMENTATION
#define STB_IMAGE_IMPLEMENTATION
#define NVG_SKIPPED_CHAR   NVG_CHAR
#define NVG_FONT_TEXTURE_FLAGS   0
#define NVG_INIT_FONTIMAGE_SIZE   512
#define NVG_MAX_FONTIMAGE_SIZE   2048
#define NVG_MAX_FONTIMAGES   4
#define NVG_INIT_COMMANDS_SIZE   256
#define NVG_INIT_POINTS_SIZE   128
#define NVG_INIT_PATHS_SIZE   16
#define NVG_INIT_VERTS_SIZE   256
#define NVG_MAX_STATES   32
#define NVG_KAPPA90   0.5522847493f
#define NVG_COUNTOF(arr)

Typedefs

typedef struct NVGstate NVGstate
typedef struct NVGpoint NVGpoint
typedef struct NVGpathCache NVGpathCache
typedef struct NVGfontContext NVGfontContext

Enumerations

enum  NVGcommands {
  NVG_MOVETO = 0 , NVG_LINETO = 1 , NVG_BEZIERTO = 2 , NVG_CLOSE = 3 ,
  NVG_WINDING = 4
}
enum  NVGpointFlags { NVG_PT_CORNER = 0x01 , NVG_PT_LEFT = 0x02 , NVG_PT_BEVEL = 0x04 , NVG_PR_INNERBEVEL = 0x08 }
enum  NVGcodepointType { NVG_SPACE , NVG_NEWLINE , NVG_CHAR , NVG_CJK_CHAR }

Functions

static float nvg__sqrtf (float a)
static float nvg__modf (float a, float b)
static float nvg__sinf (float a)
static float nvg__cosf (float a)
static float nvg__tanf (float a)
static float nvg__atan2f (float a, float b)
static float nvg__acosf (float a)
static int nvg__mini (int a, int b)
static int nvg__maxi (int a, int b)
static int nvg__clampi (int a, int mn, int mx)
static float nvg__minf (float a, float b)
static float nvg__maxf (float a, float b)
static float nvg__absf (float a)
static float nvg__signf (float a)
static float nvg__clampf (float a, float mn, float mx)
static float nvg__cross (float dx0, float dy0, float dx1, float dy1)
static float nvg__normalize (float *x, float *y)
static void nvg__deletePathCache (NVGpathCache *c)
static NVGpathCachenvg__allocPathCache (void)
static void nvg__setDevicePixelRatio (NVGcontext *ctx, float ratio)
static NVGcompositeOperationState nvg__compositeOperationState (int op)
static NVGstatenvg__getState (NVGcontext *ctx)
NVGcontextnvgCreateInternal (NVGparams *params, NVGcontext *other)
NVGparamsnvgInternalParams (NVGcontext *ctx)
void nvgDeleteInternal (NVGcontext *ctx)
void nvgBeginFrame (NVGcontext *ctx, float windowWidth, float windowHeight, float devicePixelRatio)
void nvgCancelFrame (NVGcontext *ctx)
void nvgEndFrame (NVGcontext *ctx)
NVGcolor nvgRGB (unsigned char r, unsigned char g, unsigned char b)
NVGcolor nvgRGBf (float r, float g, float b)
NVGcolor nvgRGBA (unsigned char r, unsigned char g, unsigned char b, unsigned char a)
NVGcolor nvgRGBAf (float r, float g, float b, float a)
NVGcolor nvgTransRGBA (NVGcolor c, unsigned char a)
NVGcolor nvgTransRGBAf (NVGcolor c, float a)
NVGcolor nvgLerpRGBA (NVGcolor c0, NVGcolor c1, float u)
NVGcolor nvgHSL (float h, float s, float l)
static float nvg__hue (float h, float m1, float m2)
NVGcolor nvgHSLA (float h, float s, float l, unsigned char a)
void nvgTransformIdentity (float *t)
void nvgTransformTranslate (float *t, float tx, float ty)
void nvgTransformScale (float *t, float sx, float sy)
void nvgTransformRotate (float *t, float a)
void nvgTransformSkewX (float *t, float a)
void nvgTransformSkewY (float *t, float a)
void nvgTransformMultiply (float *t, const float *s)
void nvgTransformPremultiply (float *t, const float *s)
int nvgTransformInverse (float *inv, const float *t)
void nvgTransformPoint (float *dx, float *dy, const float *t, float sx, float sy)
float nvgDegToRad (float deg)
float nvgRadToDeg (float rad)
static void nvg__setPaintColor (NVGpaint *p, NVGcolor color)
void nvgSave (NVGcontext *ctx)
void nvgRestore (NVGcontext *ctx)
void nvgReset (NVGcontext *ctx)
void nvgShapeAntiAlias (NVGcontext *ctx, int enabled)
void nvgStrokeWidth (NVGcontext *ctx, float width)
void nvgMiterLimit (NVGcontext *ctx, float limit)
void nvgLineCap (NVGcontext *ctx, int cap)
void nvgLineJoin (NVGcontext *ctx, int join)
void nvgGlobalAlpha (NVGcontext *ctx, float alpha)
void nvgGlobalTint (NVGcontext *ctx, NVGcolor tint)
NVGcolor nvgGetGlobalTint (NVGcontext *ctx)
void nvgAlpha (NVGcontext *ctx, float alpha)
void nvgTint (NVGcontext *ctx, NVGcolor tint)
void nvgTransform (NVGcontext *ctx, float a, float b, float c, float d, float e, float f)
void nvgResetTransform (NVGcontext *ctx)
void nvgTranslate (NVGcontext *ctx, float x, float y)
void nvgRotate (NVGcontext *ctx, float angle)
void nvgSkewX (NVGcontext *ctx, float angle)
void nvgSkewY (NVGcontext *ctx, float angle)
void nvgScale (NVGcontext *ctx, float x, float y)
void nvgCurrentTransform (NVGcontext *ctx, float *xform)
void nvgStrokeColor (NVGcontext *ctx, NVGcolor color)
void nvgStrokePaint (NVGcontext *ctx, NVGpaint paint)
void nvgFillColor (NVGcontext *ctx, NVGcolor color)
void nvgFillPaint (NVGcontext *ctx, NVGpaint paint)
int nvgCreateImage (NVGcontext *ctx, const char *filename, int imageFlags)
int nvgCreateImageMem (NVGcontext *ctx, int imageFlags, unsigned char *data, int ndata)
int nvgCreateImageRaw (NVGcontext *ctx, int w, int h, int imageFlags, NVGtexture format, const unsigned char *data)
int nvgCreateImageRGBA (NVGcontext *ctx, int w, int h, int imageFlags, const unsigned char *data)
void nvgUpdateImage (NVGcontext *ctx, int image, const unsigned char *data)
void nvgImageSize (NVGcontext *ctx, int image, int *w, int *h)
void nvgDeleteImage (NVGcontext *ctx, int image)
NVGpaint nvgLinearGradient (NVGcontext *ctx, float sx, float sy, float ex, float ey, NVGcolor icol, NVGcolor ocol)
NVGpaint nvgRadialGradient (NVGcontext *ctx, float cx, float cy, float inr, float outr, NVGcolor icol, NVGcolor ocol)
NVGpaint nvgBoxGradient (NVGcontext *ctx, float x, float y, float w, float h, float r, float f, NVGcolor icol, NVGcolor ocol)
NVGpaint nvgImagePattern (NVGcontext *ctx, float cx, float cy, float w, float h, float angle, int image, float alpha)
void nvgScissor (NVGcontext *ctx, float x, float y, float w, float h)
static void nvg__isectRects (float *dst, float ax, float ay, float aw, float ah, float bx, float by, float bw, float bh)
void nvgIntersectScissor (NVGcontext *ctx, float x, float y, float w, float h)
void nvgResetScissor (NVGcontext *ctx)
void nvgGlobalCompositeOperation (NVGcontext *ctx, int op)
void nvgGlobalCompositeBlendFunc (NVGcontext *ctx, int sfactor, int dfactor)
void nvgGlobalCompositeBlendFuncSeparate (NVGcontext *ctx, int srcRGB, int dstRGB, int srcAlpha, int dstAlpha)
static int nvg__ptEquals (float x1, float y1, float x2, float y2, float tol)
static float nvg__distPtSeg (float x, float y, float px, float py, float qx, float qy)
static void nvg__appendCommands (NVGcontext *ctx, float *vals, int nvals)
static void nvg__clearPathCache (NVGcontext *ctx)
static NVGpathnvg__lastPath (NVGcontext *ctx)
static void nvg__addPath (NVGcontext *ctx)
static NVGpointnvg__lastPoint (NVGcontext *ctx)
static void nvg__addPoint (NVGcontext *ctx, float x, float y, int flags)
static void nvg__closePath (NVGcontext *ctx)
static void nvg__pathWinding (NVGcontext *ctx, int winding)
static float nvg__getAverageScale (float *t)
static NVGvertexnvg__allocTempVerts (NVGcontext *ctx, int nverts)
static float nvg__triarea2 (float ax, float ay, float bx, float by, float cx, float cy)
static float nvg__polyArea (NVGpoint *pts, int npts)
static void nvg__polyReverse (NVGpoint *pts, int npts)
static void nvg__vset (NVGvertex *vtx, float x, float y, float u, float v)
static void nvg__tesselateBezier (NVGcontext *ctx, float x1, float y1, float x2, float y2, float x3, float y3, float x4, float y4, int level, int type)
static void nvg__flattenPaths (NVGcontext *ctx)
static int nvg__curveDivs (float r, float arc, float tol)
static void nvg__chooseBevel (int bevel, NVGpoint *p0, NVGpoint *p1, float w, float *x0, float *y0, float *x1, float *y1)
static NVGvertexnvg__roundJoin (NVGvertex *dst, NVGpoint *p0, NVGpoint *p1, float lw, float rw, float lu, float ru, int ncap, float fringe)
static NVGvertexnvg__bevelJoin (NVGvertex *dst, NVGpoint *p0, NVGpoint *p1, float lw, float rw, float lu, float ru, float fringe)
static NVGvertexnvg__buttCapStart (NVGvertex *dst, NVGpoint *p, float dx, float dy, float w, float d, float aa, float u0, float u1)
static NVGvertexnvg__buttCapEnd (NVGvertex *dst, NVGpoint *p, float dx, float dy, float w, float d, float aa, float u0, float u1)
static NVGvertexnvg__roundCapStart (NVGvertex *dst, NVGpoint *p, float dx, float dy, float w, int ncap, float aa, float u0, float u1)
static NVGvertexnvg__roundCapEnd (NVGvertex *dst, NVGpoint *p, float dx, float dy, float w, int ncap, float aa, float u0, float u1)
static void nvg__calculateJoins (NVGcontext *ctx, float w, int lineJoin, float miterLimit)
static int nvg__expandStroke (NVGcontext *ctx, float w, float fringe, int lineCap, int lineJoin, float miterLimit)
static int nvg__expandFill (NVGcontext *ctx, float w, int lineJoin, float miterLimit)
void nvgBeginPath (NVGcontext *ctx)
void nvgMoveTo (NVGcontext *ctx, float x, float y)
void nvgLineTo (NVGcontext *ctx, float x, float y)
void nvgBezierTo (NVGcontext *ctx, float c1x, float c1y, float c2x, float c2y, float x, float y)
void nvgQuadTo (NVGcontext *ctx, float cx, float cy, float x, float y)
void nvgArcTo (NVGcontext *ctx, float x1, float y1, float x2, float y2, float radius)
void nvgClosePath (NVGcontext *ctx)
void nvgPathWinding (NVGcontext *ctx, int dir)
void nvgArc (NVGcontext *ctx, float cx, float cy, float r, float a0, float a1, int dir)
void nvgRect (NVGcontext *ctx, float x, float y, float w, float h)
void nvgRoundedRect (NVGcontext *ctx, float x, float y, float w, float h, float r)
void nvgRoundedRectVarying (NVGcontext *ctx, float x, float y, float w, float h, float radTopLeft, float radTopRight, float radBottomRight, float radBottomLeft)
void nvgEllipse (NVGcontext *ctx, float cx, float cy, float rx, float ry)
void nvgCircle (NVGcontext *ctx, float cx, float cy, float r)
void nvgDebugDumpPathCache (NVGcontext *ctx)
void nvgFill (NVGcontext *ctx)
void nvgStroke (NVGcontext *ctx)
int nvgCreateFont (NVGcontext *ctx, const char *name, const char *filename)
int nvgCreateFontAtIndex (NVGcontext *ctx, const char *name, const char *filename, const int fontIndex)
int nvgCreateFontMem (NVGcontext *ctx, const char *name, unsigned char *data, int ndata, int freeData)
int nvgCreateFontMemAtIndex (NVGcontext *ctx, const char *name, unsigned char *data, int ndata, int freeData, const int fontIndex)
int nvgFindFont (NVGcontext *ctx, const char *name)
int nvgAddFallbackFontId (NVGcontext *ctx, int baseFont, int fallbackFont)
int nvgAddFallbackFont (NVGcontext *ctx, const char *baseFont, const char *fallbackFont)
void nvgResetFallbackFontsId (NVGcontext *ctx, int baseFont)
void nvgResetFallbackFonts (NVGcontext *ctx, const char *baseFont)
void nvgFontSize (NVGcontext *ctx, float size)
void nvgFontBlur (NVGcontext *ctx, float blur)
void nvgTextLetterSpacing (NVGcontext *ctx, float spacing)
void nvgTextLineHeight (NVGcontext *ctx, float lineHeight)
void nvgTextAlign (NVGcontext *ctx, int align)
void nvgFontFaceId (NVGcontext *ctx, int font)
void nvgFontFace (NVGcontext *ctx, const char *font)
static float nvg__quantize (float a, float d)
static float nvg__getFontScale (NVGstate *state)
static void nvg__flushTextTexture (NVGcontext *ctx)
static int nvg__allocTextAtlas (NVGcontext *ctx)
static void nvg__renderText (NVGcontext *ctx, NVGvertex *verts, int nverts)
static int nvg__isTransformFlipped (const float *xform)
float nvgText (NVGcontext *ctx, float x, float y, const char *string, const char *end)
void nvgTextBox (NVGcontext *ctx, float x, float y, float breakRowWidth, const char *string, const char *end)
int nvgTextGlyphPositions (NVGcontext *ctx, float x, float y, const char *string, const char *end, NVGglyphPosition *positions, int maxPositions)
int nvgTextBreakLines (NVGcontext *ctx, const char *string, const char *end, float breakRowWidth, NVGtextRow *rows, int maxRows)
float nvgTextBounds (NVGcontext *ctx, float x, float y, const char *string, const char *end, float *bounds)
void nvgTextBoxBounds (NVGcontext *ctx, float x, float y, float breakRowWidth, const char *string, const char *end, float *bounds)
void nvgTextMetrics (NVGcontext *ctx, float *ascender, float *descender, float *lineh)

Macro Definition Documentation

◆ FONTSTASH_IMPLEMENTATION

#define FONTSTASH_IMPLEMENTATION

◆ NVG_COUNTOF

#define NVG_COUNTOF ( arr)
Value:
(sizeof(arr) / sizeof(0[arr]))

◆ NVG_FONT_TEXTURE_FLAGS

#define NVG_FONT_TEXTURE_FLAGS   0

◆ NVG_INIT_COMMANDS_SIZE

#define NVG_INIT_COMMANDS_SIZE   256

◆ NVG_INIT_FONTIMAGE_SIZE

#define NVG_INIT_FONTIMAGE_SIZE   512

◆ NVG_INIT_PATHS_SIZE

#define NVG_INIT_PATHS_SIZE   16

◆ NVG_INIT_POINTS_SIZE

#define NVG_INIT_POINTS_SIZE   128

◆ NVG_INIT_VERTS_SIZE

#define NVG_INIT_VERTS_SIZE   256

◆ NVG_KAPPA90

#define NVG_KAPPA90   0.5522847493f

◆ NVG_MAX_FONTIMAGE_SIZE

#define NVG_MAX_FONTIMAGE_SIZE   2048

◆ NVG_MAX_FONTIMAGES

#define NVG_MAX_FONTIMAGES   4

◆ NVG_MAX_STATES

#define NVG_MAX_STATES   32

◆ NVG_SKIPPED_CHAR

#define NVG_SKIPPED_CHAR   NVG_CHAR

◆ STB_IMAGE_IMPLEMENTATION

#define STB_IMAGE_IMPLEMENTATION

Typedef Documentation

◆ NVGfontContext

typedef struct NVGfontContext NVGfontContext

◆ NVGpathCache

typedef struct NVGpathCache NVGpathCache

◆ NVGpoint

typedef struct NVGpoint NVGpoint

◆ NVGstate

typedef struct NVGstate NVGstate

Enumeration Type Documentation

◆ NVGcodepointType

Enumerator
NVG_SPACE 
NVG_NEWLINE 
NVG_CHAR 
NVG_CJK_CHAR 

◆ NVGcommands

Enumerator
NVG_MOVETO 
NVG_LINETO 
NVG_BEZIERTO 
NVG_CLOSE 
NVG_WINDING 

◆ NVGpointFlags

Enumerator
NVG_PT_CORNER 
NVG_PT_LEFT 
NVG_PT_BEVEL 
NVG_PR_INNERBEVEL 

Function Documentation

◆ nvg__absf()

float nvg__absf ( float a)
static

◆ nvg__acosf()

float nvg__acosf ( float a)
static

◆ nvg__addPath()

void nvg__addPath ( NVGcontext * ctx)
static

◆ nvg__addPoint()

void nvg__addPoint ( NVGcontext * ctx,
float x,
float y,
int flags )
static

◆ nvg__allocPathCache()

NVGpathCache * nvg__allocPathCache ( void )
static

◆ nvg__allocTempVerts()

NVGvertex * nvg__allocTempVerts ( NVGcontext * ctx,
int nverts )
static

◆ nvg__allocTextAtlas()

int nvg__allocTextAtlas ( NVGcontext * ctx)
static

◆ nvg__appendCommands()

void nvg__appendCommands ( NVGcontext * ctx,
float * vals,
int nvals )
static

◆ nvg__atan2f()

float nvg__atan2f ( float a,
float b )
static

◆ nvg__bevelJoin()

NVGvertex * nvg__bevelJoin ( NVGvertex * dst,
NVGpoint * p0,
NVGpoint * p1,
float lw,
float rw,
float lu,
float ru,
float fringe )
static

◆ nvg__buttCapEnd()

NVGvertex * nvg__buttCapEnd ( NVGvertex * dst,
NVGpoint * p,
float dx,
float dy,
float w,
float d,
float aa,
float u0,
float u1 )
static

◆ nvg__buttCapStart()

NVGvertex * nvg__buttCapStart ( NVGvertex * dst,
NVGpoint * p,
float dx,
float dy,
float w,
float d,
float aa,
float u0,
float u1 )
static

◆ nvg__calculateJoins()

void nvg__calculateJoins ( NVGcontext * ctx,
float w,
int lineJoin,
float miterLimit )
static

◆ nvg__chooseBevel()

void nvg__chooseBevel ( int bevel,
NVGpoint * p0,
NVGpoint * p1,
float w,
float * x0,
float * y0,
float * x1,
float * y1 )
static

◆ nvg__clampf()

float nvg__clampf ( float a,
float mn,
float mx )
static

◆ nvg__clampi()

int nvg__clampi ( int a,
int mn,
int mx )
static

◆ nvg__clearPathCache()

void nvg__clearPathCache ( NVGcontext * ctx)
static

◆ nvg__closePath()

void nvg__closePath ( NVGcontext * ctx)
static

◆ nvg__compositeOperationState()

NVGcompositeOperationState nvg__compositeOperationState ( int op)
static

◆ nvg__cosf()

float nvg__cosf ( float a)
static

◆ nvg__cross()

float nvg__cross ( float dx0,
float dy0,
float dx1,
float dy1 )
static

◆ nvg__curveDivs()

int nvg__curveDivs ( float r,
float arc,
float tol )
static

◆ nvg__deletePathCache()

void nvg__deletePathCache ( NVGpathCache * c)
static

◆ nvg__distPtSeg()

float nvg__distPtSeg ( float x,
float y,
float px,
float py,
float qx,
float qy )
static

◆ nvg__expandFill()

int nvg__expandFill ( NVGcontext * ctx,
float w,
int lineJoin,
float miterLimit )
static

◆ nvg__expandStroke()

int nvg__expandStroke ( NVGcontext * ctx,
float w,
float fringe,
int lineCap,
int lineJoin,
float miterLimit )
static

◆ nvg__flattenPaths()

void nvg__flattenPaths ( NVGcontext * ctx)
static

◆ nvg__flushTextTexture()

void nvg__flushTextTexture ( NVGcontext * ctx)
static

◆ nvg__getAverageScale()

float nvg__getAverageScale ( float * t)
static

◆ nvg__getFontScale()

float nvg__getFontScale ( NVGstate * state)
static

◆ nvg__getState()

NVGstate * nvg__getState ( NVGcontext * ctx)
static

◆ nvg__hue()

float nvg__hue ( float h,
float m1,
float m2 )
static

◆ nvg__isectRects()

void nvg__isectRects ( float * dst,
float ax,
float ay,
float aw,
float ah,
float bx,
float by,
float bw,
float bh )
static

◆ nvg__isTransformFlipped()

int nvg__isTransformFlipped ( const float * xform)
static

◆ nvg__lastPath()

NVGpath * nvg__lastPath ( NVGcontext * ctx)
static

◆ nvg__lastPoint()

NVGpoint * nvg__lastPoint ( NVGcontext * ctx)
static

◆ nvg__maxf()

float nvg__maxf ( float a,
float b )
static

◆ nvg__maxi()

int nvg__maxi ( int a,
int b )
static

◆ nvg__minf()

float nvg__minf ( float a,
float b )
static

◆ nvg__mini()

int nvg__mini ( int a,
int b )
static

◆ nvg__modf()

float nvg__modf ( float a,
float b )
static

◆ nvg__normalize()

float nvg__normalize ( float * x,
float * y )
static

◆ nvg__pathWinding()

void nvg__pathWinding ( NVGcontext * ctx,
int winding )
static

◆ nvg__polyArea()

float nvg__polyArea ( NVGpoint * pts,
int npts )
static

◆ nvg__polyReverse()

void nvg__polyReverse ( NVGpoint * pts,
int npts )
static

◆ nvg__ptEquals()

int nvg__ptEquals ( float x1,
float y1,
float x2,
float y2,
float tol )
static

◆ nvg__quantize()

float nvg__quantize ( float a,
float d )
static

◆ nvg__renderText()

void nvg__renderText ( NVGcontext * ctx,
NVGvertex * verts,
int nverts )
static

◆ nvg__roundCapEnd()

NVGvertex * nvg__roundCapEnd ( NVGvertex * dst,
NVGpoint * p,
float dx,
float dy,
float w,
int ncap,
float aa,
float u0,
float u1 )
static

◆ nvg__roundCapStart()

NVGvertex * nvg__roundCapStart ( NVGvertex * dst,
NVGpoint * p,
float dx,
float dy,
float w,
int ncap,
float aa,
float u0,
float u1 )
static

◆ nvg__roundJoin()

NVGvertex * nvg__roundJoin ( NVGvertex * dst,
NVGpoint * p0,
NVGpoint * p1,
float lw,
float rw,
float lu,
float ru,
int ncap,
float fringe )
static

◆ nvg__setDevicePixelRatio()

void nvg__setDevicePixelRatio ( NVGcontext * ctx,
float ratio )
static

◆ nvg__setPaintColor()

void nvg__setPaintColor ( NVGpaint * p,
NVGcolor color )
static

◆ nvg__signf()

float nvg__signf ( float a)
static

◆ nvg__sinf()

float nvg__sinf ( float a)
static

◆ nvg__sqrtf()

float nvg__sqrtf ( float a)
static

◆ nvg__tanf()

float nvg__tanf ( float a)
static

◆ nvg__tesselateBezier()

void nvg__tesselateBezier ( NVGcontext * ctx,
float x1,
float y1,
float x2,
float y2,
float x3,
float y3,
float x4,
float y4,
int level,
int type )
static

◆ nvg__triarea2()

float nvg__triarea2 ( float ax,
float ay,
float bx,
float by,
float cx,
float cy )
static

◆ nvg__vset()

void nvg__vset ( NVGvertex * vtx,
float x,
float y,
float u,
float v )
static

◆ nvgAddFallbackFont()

int nvgAddFallbackFont ( NVGcontext * ctx,
const char * baseFont,
const char * fallbackFont )

◆ nvgAddFallbackFontId()

int nvgAddFallbackFontId ( NVGcontext * ctx,
int baseFont,
int fallbackFont )

◆ nvgAlpha()

void nvgAlpha ( NVGcontext * ctx,
float alpha )

◆ nvgArc()

void nvgArc ( NVGcontext * ctx,
float cx,
float cy,
float r,
float a0,
float a1,
int dir )

◆ nvgArcTo()

void nvgArcTo ( NVGcontext * ctx,
float x1,
float y1,
float x2,
float y2,
float radius )

◆ nvgBeginFrame()

void nvgBeginFrame ( NVGcontext * ctx,
float windowWidth,
float windowHeight,
float devicePixelRatio )

◆ nvgBeginPath()

void nvgBeginPath ( NVGcontext * ctx)

◆ nvgBezierTo()

void nvgBezierTo ( NVGcontext * ctx,
float c1x,
float c1y,
float c2x,
float c2y,
float x,
float y )

◆ nvgBoxGradient()

NVGpaint nvgBoxGradient ( NVGcontext * ctx,
float x,
float y,
float w,
float h,
float r,
float f,
NVGcolor icol,
NVGcolor ocol )

◆ nvgCancelFrame()

void nvgCancelFrame ( NVGcontext * ctx)

◆ nvgCircle()

void nvgCircle ( NVGcontext * ctx,
float cx,
float cy,
float r )

◆ nvgClosePath()

void nvgClosePath ( NVGcontext * ctx)

◆ nvgCreateFont()

int nvgCreateFont ( NVGcontext * ctx,
const char * name,
const char * filename )

◆ nvgCreateFontAtIndex()

int nvgCreateFontAtIndex ( NVGcontext * ctx,
const char * name,
const char * filename,
const int fontIndex )

◆ nvgCreateFontMem()

int nvgCreateFontMem ( NVGcontext * ctx,
const char * name,
unsigned char * data,
int ndata,
int freeData )

◆ nvgCreateFontMemAtIndex()

int nvgCreateFontMemAtIndex ( NVGcontext * ctx,
const char * name,
unsigned char * data,
int ndata,
int freeData,
const int fontIndex )

◆ nvgCreateImage()

int nvgCreateImage ( NVGcontext * ctx,
const char * filename,
int imageFlags )

◆ nvgCreateImageMem()

int nvgCreateImageMem ( NVGcontext * ctx,
int imageFlags,
unsigned char * data,
int ndata )

◆ nvgCreateImageRaw()

int nvgCreateImageRaw ( NVGcontext * ctx,
int w,
int h,
int imageFlags,
NVGtexture format,
const unsigned char * data )

◆ nvgCreateImageRGBA()

int nvgCreateImageRGBA ( NVGcontext * ctx,
int w,
int h,
int imageFlags,
const unsigned char * data )

◆ nvgCreateInternal()

NVGcontext * nvgCreateInternal ( NVGparams * params,
NVGcontext * other )

◆ nvgCurrentTransform()

void nvgCurrentTransform ( NVGcontext * ctx,
float * xform )

◆ nvgDebugDumpPathCache()

void nvgDebugDumpPathCache ( NVGcontext * ctx)

◆ nvgDegToRad()

float nvgDegToRad ( float deg)

◆ nvgDeleteImage()

void nvgDeleteImage ( NVGcontext * ctx,
int image )

◆ nvgDeleteInternal()

void nvgDeleteInternal ( NVGcontext * ctx)

◆ nvgEllipse()

void nvgEllipse ( NVGcontext * ctx,
float cx,
float cy,
float rx,
float ry )

◆ nvgEndFrame()

void nvgEndFrame ( NVGcontext * ctx)

◆ nvgFill()

void nvgFill ( NVGcontext * ctx)

◆ nvgFillColor()

void nvgFillColor ( NVGcontext * ctx,
NVGcolor color )

◆ nvgFillPaint()

void nvgFillPaint ( NVGcontext * ctx,
NVGpaint paint )

◆ nvgFindFont()

int nvgFindFont ( NVGcontext * ctx,
const char * name )

◆ nvgFontBlur()

void nvgFontBlur ( NVGcontext * ctx,
float blur )

◆ nvgFontFace()

void nvgFontFace ( NVGcontext * ctx,
const char * font )

◆ nvgFontFaceId()

void nvgFontFaceId ( NVGcontext * ctx,
int font )

◆ nvgFontSize()

void nvgFontSize ( NVGcontext * ctx,
float size )

◆ nvgGetGlobalTint()

NVGcolor nvgGetGlobalTint ( NVGcontext * ctx)

◆ nvgGlobalAlpha()

void nvgGlobalAlpha ( NVGcontext * ctx,
float alpha )

◆ nvgGlobalCompositeBlendFunc()

void nvgGlobalCompositeBlendFunc ( NVGcontext * ctx,
int sfactor,
int dfactor )

◆ nvgGlobalCompositeBlendFuncSeparate()

void nvgGlobalCompositeBlendFuncSeparate ( NVGcontext * ctx,
int srcRGB,
int dstRGB,
int srcAlpha,
int dstAlpha )

◆ nvgGlobalCompositeOperation()

void nvgGlobalCompositeOperation ( NVGcontext * ctx,
int op )

◆ nvgGlobalTint()

void nvgGlobalTint ( NVGcontext * ctx,
NVGcolor tint )

◆ nvgHSL()

NVGcolor nvgHSL ( float h,
float s,
float l )

◆ nvgHSLA()

NVGcolor nvgHSLA ( float h,
float s,
float l,
unsigned char a )

◆ nvgImagePattern()

NVGpaint nvgImagePattern ( NVGcontext * ctx,
float cx,
float cy,
float w,
float h,
float angle,
int image,
float alpha )

◆ nvgImageSize()

void nvgImageSize ( NVGcontext * ctx,
int image,
int * w,
int * h )

◆ nvgInternalParams()

NVGparams * nvgInternalParams ( NVGcontext * ctx)

◆ nvgIntersectScissor()

void nvgIntersectScissor ( NVGcontext * ctx,
float x,
float y,
float w,
float h )

◆ nvgLerpRGBA()

NVGcolor nvgLerpRGBA ( NVGcolor c0,
NVGcolor c1,
float u )

◆ nvgLinearGradient()

NVGpaint nvgLinearGradient ( NVGcontext * ctx,
float sx,
float sy,
float ex,
float ey,
NVGcolor icol,
NVGcolor ocol )

◆ nvgLineCap()

void nvgLineCap ( NVGcontext * ctx,
int cap )

◆ nvgLineJoin()

void nvgLineJoin ( NVGcontext * ctx,
int join )

◆ nvgLineTo()

void nvgLineTo ( NVGcontext * ctx,
float x,
float y )

◆ nvgMiterLimit()

void nvgMiterLimit ( NVGcontext * ctx,
float limit )

◆ nvgMoveTo()

void nvgMoveTo ( NVGcontext * ctx,
float x,
float y )

◆ nvgPathWinding()

void nvgPathWinding ( NVGcontext * ctx,
int dir )

◆ nvgQuadTo()

void nvgQuadTo ( NVGcontext * ctx,
float cx,
float cy,
float x,
float y )

◆ nvgRadialGradient()

NVGpaint nvgRadialGradient ( NVGcontext * ctx,
float cx,
float cy,
float inr,
float outr,
NVGcolor icol,
NVGcolor ocol )

◆ nvgRadToDeg()

float nvgRadToDeg ( float rad)

◆ nvgRect()

void nvgRect ( NVGcontext * ctx,
float x,
float y,
float w,
float h )

◆ nvgReset()

void nvgReset ( NVGcontext * ctx)

◆ nvgResetFallbackFonts()

void nvgResetFallbackFonts ( NVGcontext * ctx,
const char * baseFont )

◆ nvgResetFallbackFontsId()

void nvgResetFallbackFontsId ( NVGcontext * ctx,
int baseFont )

◆ nvgResetScissor()

void nvgResetScissor ( NVGcontext * ctx)

◆ nvgResetTransform()

void nvgResetTransform ( NVGcontext * ctx)

◆ nvgRestore()

void nvgRestore ( NVGcontext * ctx)

◆ nvgRGB()

NVGcolor nvgRGB ( unsigned char r,
unsigned char g,
unsigned char b )

◆ nvgRGBA()

NVGcolor nvgRGBA ( unsigned char r,
unsigned char g,
unsigned char b,
unsigned char a )

◆ nvgRGBAf()

NVGcolor nvgRGBAf ( float r,
float g,
float b,
float a )

◆ nvgRGBf()

NVGcolor nvgRGBf ( float r,
float g,
float b )

◆ nvgRotate()

void nvgRotate ( NVGcontext * ctx,
float angle )

◆ nvgRoundedRect()

void nvgRoundedRect ( NVGcontext * ctx,
float x,
float y,
float w,
float h,
float r )

◆ nvgRoundedRectVarying()

void nvgRoundedRectVarying ( NVGcontext * ctx,
float x,
float y,
float w,
float h,
float radTopLeft,
float radTopRight,
float radBottomRight,
float radBottomLeft )

◆ nvgSave()

void nvgSave ( NVGcontext * ctx)

◆ nvgScale()

void nvgScale ( NVGcontext * ctx,
float x,
float y )

◆ nvgScissor()

void nvgScissor ( NVGcontext * ctx,
float x,
float y,
float w,
float h )

◆ nvgShapeAntiAlias()

void nvgShapeAntiAlias ( NVGcontext * ctx,
int enabled )

◆ nvgSkewX()

void nvgSkewX ( NVGcontext * ctx,
float angle )

◆ nvgSkewY()

void nvgSkewY ( NVGcontext * ctx,
float angle )

◆ nvgStroke()

void nvgStroke ( NVGcontext * ctx)

◆ nvgStrokeColor()

void nvgStrokeColor ( NVGcontext * ctx,
NVGcolor color )

◆ nvgStrokePaint()

void nvgStrokePaint ( NVGcontext * ctx,
NVGpaint paint )

◆ nvgStrokeWidth()

void nvgStrokeWidth ( NVGcontext * ctx,
float width )

◆ nvgText()

float nvgText ( NVGcontext * ctx,
float x,
float y,
const char * string,
const char * end )

◆ nvgTextAlign()

void nvgTextAlign ( NVGcontext * ctx,
int align )

◆ nvgTextBounds()

float nvgTextBounds ( NVGcontext * ctx,
float x,
float y,
const char * string,
const char * end,
float * bounds )

◆ nvgTextBox()

void nvgTextBox ( NVGcontext * ctx,
float x,
float y,
float breakRowWidth,
const char * string,
const char * end )

◆ nvgTextBoxBounds()

void nvgTextBoxBounds ( NVGcontext * ctx,
float x,
float y,
float breakRowWidth,
const char * string,
const char * end,
float * bounds )

◆ nvgTextBreakLines()

int nvgTextBreakLines ( NVGcontext * ctx,
const char * string,
const char * end,
float breakRowWidth,
NVGtextRow * rows,
int maxRows )

◆ nvgTextGlyphPositions()

int nvgTextGlyphPositions ( NVGcontext * ctx,
float x,
float y,
const char * string,
const char * end,
NVGglyphPosition * positions,
int maxPositions )

◆ nvgTextLetterSpacing()

void nvgTextLetterSpacing ( NVGcontext * ctx,
float spacing )

◆ nvgTextLineHeight()

void nvgTextLineHeight ( NVGcontext * ctx,
float lineHeight )

◆ nvgTextMetrics()

void nvgTextMetrics ( NVGcontext * ctx,
float * ascender,
float * descender,
float * lineh )

◆ nvgTint()

void nvgTint ( NVGcontext * ctx,
NVGcolor tint )

◆ nvgTransform()

void nvgTransform ( NVGcontext * ctx,
float a,
float b,
float c,
float d,
float e,
float f )

◆ nvgTransformIdentity()

void nvgTransformIdentity ( float * t)

◆ nvgTransformInverse()

int nvgTransformInverse ( float * inv,
const float * t )

◆ nvgTransformMultiply()

void nvgTransformMultiply ( float * t,
const float * s )

◆ nvgTransformPoint()

void nvgTransformPoint ( float * dx,
float * dy,
const float * t,
float sx,
float sy )

◆ nvgTransformPremultiply()

void nvgTransformPremultiply ( float * t,
const float * s )

◆ nvgTransformRotate()

void nvgTransformRotate ( float * t,
float a )

◆ nvgTransformScale()

void nvgTransformScale ( float * t,
float sx,
float sy )

◆ nvgTransformSkewX()

void nvgTransformSkewX ( float * t,
float a )

◆ nvgTransformSkewY()

void nvgTransformSkewY ( float * t,
float a )

◆ nvgTransformTranslate()

void nvgTransformTranslate ( float * t,
float tx,
float ty )

◆ nvgTranslate()

void nvgTranslate ( NVGcontext * ctx,
float x,
float y )

◆ nvgTransRGBA()

NVGcolor nvgTransRGBA ( NVGcolor c,
unsigned char a )

◆ nvgTransRGBAf()

NVGcolor nvgTransRGBAf ( NVGcolor c,
float a )

◆ nvgUpdateImage()

void nvgUpdateImage ( NVGcontext * ctx,
int image,
const unsigned char * data )