diff options
Diffstat (limited to '3rdparty/bgfx/examples/common/nanovg/nanovg.h')
-rw-r--r-- | 3rdparty/bgfx/examples/common/nanovg/nanovg.h | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/3rdparty/bgfx/examples/common/nanovg/nanovg.h b/3rdparty/bgfx/examples/common/nanovg/nanovg.h index 31109efad28..7881043187b 100644 --- a/3rdparty/bgfx/examples/common/nanovg/nanovg.h +++ b/3rdparty/bgfx/examples/common/nanovg/nanovg.h @@ -143,6 +143,7 @@ enum NVGimageFlags { NVG_IMAGE_REPEATY = 1<<2, // Repeat image in Y direction. NVG_IMAGE_FLIPY = 1<<3, // Flips (inverses) image in Y direction when rendered. NVG_IMAGE_PREMULTIPLIED = 1<<4, // Image data has premultiplied alpha. + NVG_IMAGE_NEAREST = 1<<5, // Image interpolation is Nearest instead Linear }; // Begin drawing a new frame @@ -267,7 +268,7 @@ void nvgLineCap(NVGcontext* ctx, int cap); void nvgLineJoin(NVGcontext* ctx, int join); // Sets the transparency applied to all rendered shapes. -// Alreade transparent paths will get proportionally more transparent as well. +// Already transparent paths will get proportionally more transparent as well. void nvgGlobalAlpha(NVGcontext* ctx, float alpha); // @@ -399,7 +400,7 @@ NVGpaint nvgLinearGradient(NVGcontext* ctx, float sx, float sy, float ex, float NVGcolor icol, NVGcolor ocol); // Creates and returns a box gradient. Box gradient is a feathered rounded rectangle, it is useful for rendering -// drop shadows or hilights for boxes. Parameters (x,y) define the top-left corner of the rectangle, +// drop shadows or highlights for boxes. Parameters (x,y) define the top-left corner of the rectangle, // (w,h) define the size of the rectangle, r defines the corner radius, and f feather. Feather defines how blurry // the border of the rectangle is. Parameter icol specifies the inner color and ocol the outer color of the gradient. // The gradient is transformed by the current transform when it is passed to nvgFillPaint() or nvgStrokePaint(). @@ -491,6 +492,9 @@ void nvgRect(NVGcontext* ctx, float x, float y, float w, float h); // Creates new rounded rectangle shaped sub-path. void nvgRoundedRect(NVGcontext* ctx, float x, float y, float w, float h, float r); +// Creates new rounded rectangle shaped sub-path with varying radii for each corner. +void nvgRoundedRectVarying(NVGcontext* ctx, float x, float y, float w, float h, float radTopLeft, float radTopRight, float radBottomRight, float radBottomLeft); + // Creates new ellipse shaped sub-path. void nvgEllipse(NVGcontext* ctx, float cx, float cy, float rx, float ry); @@ -650,10 +654,10 @@ struct NVGparams { int (*renderGetTextureSize)(void* uptr, int image, int* w, int* h); void (*renderViewport)(void* uptr, int width, int height, float devicePixelRatio); void (*renderCancel)(void* uptr); - void (*renderFlush)(void* uptr, NVGcompositeOperationState compositeOperation); - void (*renderFill)(void* uptr, NVGpaint* paint, NVGscissor* scissor, float fringe, const float* bounds, const NVGpath* paths, int npaths); - void (*renderStroke)(void* uptr, NVGpaint* paint, NVGscissor* scissor, float fringe, float strokeWidth, const NVGpath* paths, int npaths); - void (*renderTriangles)(void* uptr, NVGpaint* paint, NVGscissor* scissor, const NVGvertex* verts, int nverts); + void (*renderFlush)(void* uptr); + void (*renderFill)(void* uptr, NVGpaint* paint, NVGcompositeOperationState compositeOperation, NVGscissor* scissor, float fringe, const float* bounds, const NVGpath* paths, int npaths); + void (*renderStroke)(void* uptr, NVGpaint* paint, NVGcompositeOperationState compositeOperation, NVGscissor* scissor, float fringe, float strokeWidth, const NVGpath* paths, int npaths); + void (*renderTriangles)(void* uptr, NVGpaint* paint, NVGcompositeOperationState compositeOperation, NVGscissor* scissor, const NVGvertex* verts, int nverts); void (*renderDelete)(void* uptr); }; typedef struct NVGparams NVGparams; |