Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Added NVG_ANTIALIAS into read me, commented line cap/join

  • Loading branch information...
commit 0c6d5d3702177bbf47e43c037f0b0ab52f03e7da 1 parent 31f8f60
@memononen authored
Showing with 6 additions and 1 deletion.
  1. +1 −1  README.md
  2. +5 −0 src/nanovg.h
View
2  README.md
@@ -19,7 +19,7 @@ The NanoVG API is modeled loosely on HTML5 canvas API. If you know canvas, you'r
The drawing context is created using platform specific constructor function. If you're using the default OpenGL 2.0 back-end the context is created as follows:
```C
-struct NVGcontext* vg = nvgCreateGL2(512, 512);
+struct NVGcontext* vg = nvgCreateGL2(512, 512, NVG_ANTIALIAS);
```
The two values passed to the constructor define the size of the texture atlas used for text rendering, 512x512 is a good starting point. If you're rendering retina sized text or plan to use a lot of different fonts, 1024x1024 is better choice.
View
5 src/nanovg.h
@@ -158,7 +158,12 @@ void nvgMiterLimit(struct NVGcontext* ctx, float limit);
// Sets the stroke witdth of the stroke style.
void nvgStrokeWidth(struct NVGcontext* ctx, float size);
+// Sets how the end of the line (cap) is drawn,
+// Can be one of: NVG_BUTT (default), NVG_ROUND, NVG_SQUARE.
void nvgLineCap(struct NVGcontext* ctx, int cap);
+
+// Sets how sharp path corners are drawn.
+// Can be one of NVG_MITER (default), NVG_ROUND, NVG_BEVEL.
void nvgLineJoin(struct NVGcontext* ctx, int join);
//
Please sign in to comment.
Something went wrong with that request. Please try again.