| 
    DISTRHO Plugin Framework
    
   | 
 
#include <NanoVG.hpp>
  
 Public Member Functions | |
| NanoWidget (Window &parent, int flags=CREATE_ANTIALIAS) | |
| NanoWidget (Widget *groupWidget, int flags=CREATE_ANTIALIAS) | |
| NanoWidget (NanoWidget *groupWidget) | |
| virtual | ~NanoWidget () | 
  Public Member Functions inherited from Widget | |
| Widget (Window &parent) | |
| Widget (Widget *groupWidget) | |
| virtual | ~Widget () | 
| bool | isVisible () const noexcept | 
| void | setVisible (bool yesNo) | 
| void | show () | 
| void | hide () | 
| uint | getWidth () const noexcept | 
| uint | getHeight () const noexcept | 
| const Size< uint > & | getSize () const noexcept | 
| void | setWidth (uint width) noexcept | 
| void | setHeight (uint height) noexcept | 
| void | setSize (uint width, uint height) noexcept | 
| void | setSize (const Size< uint > &size) noexcept | 
| int | getAbsoluteX () const noexcept | 
| int | getAbsoluteY () const noexcept | 
| const Point< int > & | getAbsolutePos () const noexcept | 
| void | setAbsoluteX (int x) noexcept | 
| void | setAbsoluteY (int y) noexcept | 
| void | setAbsolutePos (int x, int y) noexcept | 
| void | setAbsolutePos (const Point< int > &pos) noexcept | 
| Application & | getParentApp () const noexcept | 
| Window & | getParentWindow () const noexcept | 
| bool | contains (int x, int y) const noexcept | 
| bool | contains (const Point< int > &pos) const noexcept | 
| void | repaint () noexcept | 
| uint | getId () const noexcept | 
| void | setId (uint id) noexcept | 
  Public Member Functions inherited from NanoVG | |
| NanoVG (int flags=CREATE_ANTIALIAS) | |
| NanoVG (NanoWidget *groupWidget) | |
| virtual | ~NanoVG () | 
| NVGcontext * | getContext () const noexcept | 
| void | beginFrame (const uint width, const uint height, const float scaleFactor=1.0f) | 
| void | beginFrame (Widget *const widget) | 
| void | cancelFrame () | 
| void | endFrame () | 
| void | save () | 
| void | restore () | 
| void | reset () | 
| void | strokeColor (const Color &color) | 
| void | strokeColor (const int red, const int green, const int blue, const int alpha=255) | 
| void | strokeColor (const float red, const float green, const float blue, const float alpha=1.0f) | 
| void | strokePaint (const Paint &paint) | 
| void | fillColor (const Color &color) | 
| void | fillColor (const int red, const int green, const int blue, const int alpha=255) | 
| void | fillColor (const float red, const float green, const float blue, const float alpha=1.0f) | 
| void | fillPaint (const Paint &paint) | 
| void | miterLimit (float limit) | 
| void | strokeWidth (float size) | 
| void | lineCap (LineCap cap=BUTT) | 
| void | lineJoin (LineCap join=MITER) | 
| void | globalAlpha (float alpha) | 
| void | resetTransform () | 
| void | transform (float a, float b, float c, float d, float e, float f) | 
| void | translate (float x, float y) | 
| void | rotate (float angle) | 
| void | skewX (float angle) | 
| void | skewY (float angle) | 
| void | scale (float x, float y) | 
| void | currentTransform (float xform[6]) | 
| NanoImage::Handle | createImageFromFile (const char *filename, ImageFlags imageFlags) | 
| NanoImage::Handle | createImageFromFile (const char *filename, int imageFlags) | 
| NanoImage::Handle | createImageFromMemory (uchar *data, uint dataSize, ImageFlags imageFlags) | 
| NanoImage::Handle | createImageFromMemory (uchar *data, uint dataSize, int imageFlags) | 
| NanoImage::Handle | createImageFromRGBA (uint w, uint h, const uchar *data, ImageFlags imageFlags) | 
| NanoImage::Handle | createImageFromRGBA (uint w, uint h, const uchar *data, int imageFlags) | 
| NanoImage::Handle | createImageFromTextureHandle (GLuint textureId, uint w, uint h, ImageFlags imageFlags, bool deleteTexture=false) | 
| NanoImage::Handle | createImageFromTextureHandle (GLuint textureId, uint w, uint h, int imageFlags, bool deleteTexture=false) | 
| Paint | linearGradient (float sx, float sy, float ex, float ey, const Color &icol, const Color &ocol) | 
| Paint | boxGradient (float x, float y, float w, float h, float r, float f, const Color &icol, const Color &ocol) | 
| Paint | radialGradient (float cx, float cy, float inr, float outr, const Color &icol, const Color &ocol) | 
| Paint | imagePattern (float ox, float oy, float ex, float ey, float angle, const NanoImage &image, float alpha) | 
| void | scissor (float x, float y, float w, float h) | 
| void | intersectScissor (float x, float y, float w, float h) | 
| void | resetScissor () | 
| void | beginPath () | 
| void | moveTo (float x, float y) | 
| void | lineTo (float x, float y) | 
| void | bezierTo (float c1x, float c1y, float c2x, float c2y, float x, float y) | 
| void | quadTo (float cx, float cy, float x, float y) | 
| void | arcTo (float x1, float y1, float x2, float y2, float radius) | 
| void | closePath () | 
| void | pathWinding (Winding dir) | 
| void | arc (float cx, float cy, float r, float a0, float a1, Winding dir) | 
| void | rect (float x, float y, float w, float h) | 
| void | roundedRect (float x, float y, float w, float h, float r) | 
| void | ellipse (float cx, float cy, float rx, float ry) | 
| void | circle (float cx, float cy, float r) | 
| void | fill () | 
| void | stroke () | 
| FontId | createFontFromFile (const char *name, const char *filename) | 
| FontId | createFontFromMemory (const char *name, const uchar *data, uint dataSize, bool freeData) | 
| FontId | findFont (const char *name) | 
| void | fontSize (float size) | 
| void | fontBlur (float blur) | 
| void | textLetterSpacing (float spacing) | 
| void | textLineHeight (float lineHeight) | 
| void | textAlign (Align align) | 
| void | textAlign (int align) | 
| void | fontFaceId (FontId font) | 
| void | fontFace (const char *font) | 
| float | text (float x, float y, const char *string, const char *end) | 
| void | textBox (float x, float y, float breakRowWidth, const char *string, const char *end=nullptr) | 
| float | textBounds (float x, float y, const char *string, const char *end, Rectangle< float > &bounds) | 
| void | textBoxBounds (float x, float y, float breakRowWidth, const char *string, const char *end, float bounds[4]) | 
| int | textGlyphPositions (float x, float y, const char *string, const char *end, GlyphPosition &positions, int maxPositions) | 
| void | textMetrics (float *ascender, float *descender, float *lineh) | 
| int | textBreakLines (const char *string, const char *end, float breakRowWidth, TextRow &rows, int maxRows) | 
| virtual void | loadSharedResources () | 
Protected Member Functions | |
| virtual void | onNanoDisplay ()=0 | 
  Protected Member Functions inherited from Widget | |
| virtual bool | onKeyboard (const KeyboardEvent &) | 
| virtual bool | onSpecial (const SpecialEvent &) | 
| virtual bool | onMouse (const MouseEvent &) | 
| virtual bool | onMotion (const MotionEvent &) | 
| virtual bool | onScroll (const ScrollEvent &) | 
| virtual void | onResize (const ResizeEvent &) | 
| virtual void | onPositionChanged (const PositionChangedEvent &) | 
Additional Inherited Members | |
  Public Types inherited from NanoVG | |
| enum | CreateFlags { CREATE_ANTIALIAS = 1 << 0, CREATE_STENCIL_STROKES = 1 << 1, CREATE_DEBUG = 1 << 2 } | 
| enum | ImageFlags {  IMAGE_GENERATE_MIPMAPS = 1 << 0, IMAGE_REPEAT_X = 1 << 1, IMAGE_REPEAT_Y = 1 << 2, IMAGE_FLIP_Y = 1 << 3, IMAGE_PREMULTIPLIED = 1 << 4 }  | 
| enum | Align {  ALIGN_LEFT = 1 << 0, ALIGN_CENTER = 1 << 1, ALIGN_RIGHT = 1 << 2, ALIGN_TOP = 1 << 3, ALIGN_MIDDLE = 1 << 4, ALIGN_BOTTOM = 1 << 5, ALIGN_BASELINE = 1 << 6 }  | 
| enum | LineCap {  BUTT, ROUND, SQUARE, BEVEL, MITER }  | 
| enum | Solidity { SOLID = 1, HOLE = 2 } | 
| enum | Winding { CCW = 1, CW = 2 } | 
| typedef int | FontId | 
  Static Public Member Functions inherited from NanoVG | |
| static void | transformIdentity (float dst[6]) | 
| static void | transformTranslate (float dst[6], float tx, float ty) | 
| static void | transformScale (float dst[6], float sx, float sy) | 
| static void | transformRotate (float dst[6], float a) | 
| static void | transformSkewX (float dst[6], float a) | 
| static void | transformSkewY (float dst[6], float a) | 
| static void | transformMultiply (float dst[6], const float src[6]) | 
| static void | transformPremultiply (float dst[6], const float src[6]) | 
| static int | transformInverse (float dst[6], const float src[6]) | 
| static void | transformPoint (float &dstx, float &dsty, const float xform[6], float srcx, float srcy) | 
| static float | degToRad (float deg) | 
| static float | radToDeg (float rad) | 
This class implements the NanoVG drawing API inside a DGL Widget. The drawing function onDisplay() is implemented internally but a new onNanoDisplay() needs to be overridden instead.
      
  | 
  explicit | 
Constructor.
      
  | 
  explicit | 
Constructor for a subwidget.
      
  | 
  explicit | 
Constructor for a subwidget, reusing a NanoVG context.
      
  | 
  virtual | 
Destructor.
      
  | 
  protectedpure virtual | 
New virtual onDisplay function.
 1.8.13