nanosvgrast.h
changeset 527 a26235cc1970
parent 524 b4b49635cbd8
child 551 21559520f1be
     1.1 --- a/nanosvgrast.h	Sun Oct 22 00:42:42 2017 -0700
     1.2 +++ b/nanosvgrast.h	Sun Oct 22 00:46:52 2017 -0700
     1.3 @@ -850,6 +850,7 @@
     1.4  static NSVGactiveEdge* nsvg__addActive(NSVGrasterizer* r, NSVGedge* e, float startPoint)
     1.5  {
     1.6  	 NSVGactiveEdge* z;
     1.7 +	 float dxdy;
     1.8  
     1.9  	if (r->freelist != NULL) {
    1.10  		// Restore from freelist.
    1.11 @@ -861,7 +862,7 @@
    1.12  		if (z == NULL) return NULL;
    1.13  	}
    1.14  
    1.15 -	float dxdy = (e->x1 - e->x0) / (e->y1 - e->y0);
    1.16 +	dxdy = (e->x1 - e->x0) / (e->y1 - e->y0);
    1.17  //	STBTT_assert(e->y0 <= start_point);
    1.18  	// round dx down to avoid going too far
    1.19  	if (dxdy < 0)
    1.20 @@ -974,7 +975,7 @@
    1.21  	return nsvg__RGBA((unsigned char)r, (unsigned char)g, (unsigned char)b, (unsigned char)a);
    1.22  }
    1.23  
    1.24 -static inline int nsvg__div255(int x)
    1.25 +static int nsvg__div255(int x)
    1.26  {
    1.27      return ((x+1) * 257) >> 16;
    1.28  }