X-Git-Url: http://git.asbjorn.biz/?p=swftools.git;a=blobdiff_plain;f=lib%2Fgfxtools.c;h=2a6409b93f627e76ec674e1e58c65b702705f11d;hp=296bea103060ec3476f249b29cce886e2b8ba4c6;hb=e0db864fa0f2b31e00c46c29d74e47c4a29b3001;hpb=76d7de03a9ce370259976be5412508b9182b5bb3 diff --git a/lib/gfxtools.c b/lib/gfxtools.c index 296bea1..2a6409b 100644 --- a/lib/gfxtools.c +++ b/lib/gfxtools.c @@ -454,6 +454,16 @@ static int approximate3(const cspline_t*s, qspline_t*q, int size, double quality return num; } +void gfxdraw_conicTo(gfxdrawer_t*draw, double cx, double cy, double tox, double toy) +{ + 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); +} + + void gfxdraw_cubicTo(gfxdrawer_t*draw, double c1x, double c1y, double c2x, double c2y, double x, double y) { qspline_t q[128];