Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion src/nanosvg.h
Original file line number Diff line number Diff line change
Expand Up @@ -1488,7 +1488,9 @@ static NSVGcoordinate nsvg__parseCoordinateRaw(const char* str)

static NSVGcoordinate nsvg__coord(float v, int units)
{
NSVGcoordinate coord = {v, units};
NSVGcoordinate coord ;
coord.value = v;
coord.units = units;
return coord;
}

Expand Down
3 changes: 2 additions & 1 deletion src/nanosvgrast.h
Original file line number Diff line number Diff line change
Expand Up @@ -855,6 +855,7 @@ static int nsvg__cmpEdge(const void *p, const void *q)
static NSVGactiveEdge* nsvg__addActive(NSVGrasterizer* r, NSVGedge* e, float startPoint)
{
NSVGactiveEdge* z;
float dxdy;

if (r->freelist != NULL) {
// Restore from freelist.
Expand All @@ -866,7 +867,7 @@ static NSVGactiveEdge* nsvg__addActive(NSVGrasterizer* r, NSVGedge* e, float sta
if (z == NULL) return NULL;
}

float dxdy = (e->x1 - e->x0) / (e->y1 - e->y0);
dxdy = (e->x1 - e->x0) / (e->y1 - e->y0);
// STBTT_assert(e->y0 <= start_point);
// round dx down to avoid going too far
if (dxdy < 0)
Expand Down