@@ -157,6 +157,7 @@ enum NVGimageFlags {
157157 NVG_IMAGE_REPEATY = 1 <<2 , // Repeat image in Y direction.
158158 NVG_IMAGE_FLIPY = 1 <<3 , // Flips (inverses) image in Y direction when rendered.
159159 NVG_IMAGE_PREMULTIPLIED = 1 <<4 , // Image data has premultiplied alpha.
160+ NVG_IMAGE_NEAREST = 1 <<5 , // Image interpolation is Nearest instead Linear
160161};
161162
162163// Begin drawing a new frame
@@ -167,7 +168,7 @@ enum NVGimageFlags {
167168// For example, GLFW returns two dimension for an opened window: window size and
168169// frame buffer size. In that case you would set windowWidth/Height to the window size
169170// devicePixelRatio to: frameBufferWidth / windowWidth.
170- extern NVG_EXPORT void nvgBeginFrame (NVGcontext * ctx , int windowWidth , int windowHeight , float devicePixelRatio );
171+ extern NVG_EXPORT void nvgBeginFrame (NVGcontext * ctx , float windowWidth , float windowHeight , float devicePixelRatio );
171172
172173// Cancels drawing the current frame.
173174extern NVG_EXPORT void nvgCancelFrame (NVGcontext * ctx );
@@ -253,6 +254,9 @@ extern NVG_EXPORT void nvgReset(NVGcontext* ctx);
253254//
254255// Current render style can be saved and restored using nvgSave() and nvgRestore().
255256
257+ // Sets whether to draw antialias for nvgStroke() and nvgFill(). It's enabled by default.
258+ void nvgShapeAntiAlias (NVGcontext * ctx , int enabled );
259+
256260// Sets current stroke style to a solid color.
257261extern NVG_EXPORT void nvgStrokeColor (NVGcontext * ctx , NVGcolor color );
258262
@@ -665,12 +669,12 @@ struct NVGparams {
665669 int (* renderDeleteTexture )(void * uptr , int image );
666670 int (* renderUpdateTexture )(void * uptr , int image , int x , int y , int w , int h , const unsigned char * data );
667671 int (* renderGetTextureSize )(void * uptr , int image , int * w , int * h );
668- void (* renderViewport )(void * uptr , int width , int height , float devicePixelRatio );
672+ void (* renderViewport )(void * uptr , float width , float height , float devicePixelRatio );
669673 void (* renderCancel )(void * uptr );
670- void (* renderFlush )(void * uptr , NVGcompositeOperationState compositeOperation );
671- void (* renderFill )(void * uptr , NVGpaint * paint , NVGscissor * scissor , float fringe , const float * bounds , const NVGpath * paths , int npaths );
672- void (* renderStroke )(void * uptr , NVGpaint * paint , NVGscissor * scissor , float fringe , float strokeWidth , const NVGpath * paths , int npaths );
673- void (* renderTriangles )(void * uptr , NVGpaint * paint , NVGscissor * scissor , const NVGvertex * verts , int nverts );
674+ void (* renderFlush )(void * uptr );
675+ void (* renderFill )(void * uptr , NVGpaint * paint , NVGcompositeOperationState compositeOperation , NVGscissor * scissor , float fringe , const float * bounds , const NVGpath * paths , int npaths );
676+ void (* renderStroke )(void * uptr , NVGpaint * paint , NVGcompositeOperationState compositeOperation , NVGscissor * scissor , float fringe , float strokeWidth , const NVGpath * paths , int npaths );
677+ void (* renderTriangles )(void * uptr , NVGpaint * paint , NVGcompositeOperationState compositeOperation , NVGscissor * scissor , const NVGvertex * verts , int nverts );
674678 void (* renderDelete )(void * uptr );
675679};
676680typedef struct NVGparams NVGparams ;
0 commit comments