memononen / nanovg

Antialiased 2D vector drawing library on top of OpenGL for UI and visualizations.
zlib License
5.06k stars 767 forks source link

outlines don’t draw properly #648

Closed ColleagueRiley closed 1 year ago

ColleagueRiley commented 1 year ago

I have a simple SVG file (included), that draws a transparent rect with a red stroke, making a rectangle outline. For some reason when I load it it draws the outline on a gray rect.

image = nsvgParseFromFile("rect.svg", "px", 96);

rast = nsvgCreateRasterizer(); // create rasterzing object for "flattening"

unsigned char* img = (unsigned char*)malloc(rect.w*rect.h*4); // make data with room for the image

nsvgRasterize(rast, image, 0,0,1, img, w, h, w*4); // load the flattened image into the data

rect

mulle-nat commented 1 year ago

Wrong project really. This is an issue for the equally unmaintained https://github.com/memononen/nanosvg

ColleagueRiley commented 1 year ago

oops :eyes: