From 0c6d5d3702177bbf47e43c037f0b0ab52f03e7da Mon Sep 17 00:00:00 2001 From: Mikko Mononen Date: Tue, 18 Feb 2014 19:39:38 +0200 Subject: [PATCH] Added NVG_ANTIALIAS into read me, commented line cap/join --- README.md | 2 +- src/nanovg.h | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 80231a8..755c0e1 100644 --- a/README.md +++ b/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. diff --git a/src/nanovg.h b/src/nanovg.h index 20ee98c..9c4c166 100644 --- a/src/nanovg.h +++ b/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); //