return num;
}
-void gfxdraw_conicTo(gfxdrawer_t*draw, double cx, double cy, double tox, double toy)
+void gfxdraw_conicTo(gfxdrawer_t*draw, double cx, double cy, double tox, double toy, double quality)
{
double c1x = (draw->x + 2 * cx) / 3;
double c1y = (draw->y + 2 * cy) / 3;
double c2x = (2 * cx + tox) / 3;
double c2y = (2 * cy + toy) / 3;
- gfxdraw_cubicTo(draw, c1x, c1y, c2x, c2y, tox, toy);
+ gfxdraw_cubicTo(draw, c1x, c1y, c2x, c2y, tox, toy, quality);
}
-void gfxdraw_cubicTo(gfxdrawer_t*draw, double c1x, double c1y, double c2x, double c2y, double x, double y)
+void gfxdraw_cubicTo(gfxdrawer_t*draw, double c1x, double c1y, double c2x, double c2y, double x, double y, double quality)
{
qspline_t q[128];
cspline_t c;
- double maxerror = 0.01;
+ double maxerror = quality>0 ? quality : 1.0;
int t,num;
c.start.x = draw->x;
void gfxline_free(gfxline_t*l);
gfxline_t* gfxline_clone(gfxline_t*line);
-void gfxdraw_cubicTo(gfxdrawer_t*draw, double c1x, double c1y, double c2x, double c2y, double x, double y);
-void gfxdraw_conicTo(gfxdrawer_t*draw, double cx, double cy, double tox, double toy);
+void gfxdraw_cubicTo(gfxdrawer_t*draw, double c1x, double c1y, double c2x, double c2y, double x, double y, double quality);
+void gfxdraw_conicTo(gfxdrawer_t*draw, double cx, double cy, double tox, double toy, double quality);
gfxbbox_t gfxline_getbbox(gfxline_t*line);
gfxbbox_t gfxbbox_expand_to_point(gfxbbox_t box, gfxcoord_t x, gfxcoord_t y);