X-Git-Url: http://git.asbjorn.biz/?a=blobdiff_plain;f=lib%2Fdevices%2Fopengl.c;h=a9459a147ac035ce54aad16ef8bcc39c5e77e524;hb=7dc8b2115c007958d3054233901ba8dd9eb56ba0;hp=aee8be84268789ce3c9fd7c4bc3080b0d3de84fa;hpb=854148ccf83f1fa8d8e023b7926dc3d58e869372;p=swftools.git diff --git a/lib/devices/opengl.c b/lib/devices/opengl.c index aee8be8..a9459a1 100644 --- a/lib/devices/opengl.c +++ b/lib/devices/opengl.c @@ -177,7 +177,7 @@ void opengl_fill(struct _gfxdevice*dev, gfxline_t*line, gfxcolor_t*color) len = 0; while(l) { if(l->type == gfx_splineTo) { - double c = sqrt(abs(l->x-2*l->sx+lastx) + abs(l->x-2*l->sy+lasty))/2; + double c = sqrt(abs(l->x-2*l->sx+lastx) + abs(l->y-2*l->sy+lasty))/2; int steps = (int)c; if(steps<1) steps = 1; len += steps; @@ -205,7 +205,7 @@ void opengl_fill(struct _gfxdevice*dev, gfxline_t*line, gfxcolor_t*color) if(l->type == gfx_splineTo) { int j; - double c = sqrt(abs(l->x-2*l->sx+lastx) + abs(l->x-2*l->sy+lasty))/2; + double c = sqrt(abs(l->x-2*l->sx+lastx) + abs(l->y-2*l->sy+lasty))/2; int steps = (int)c; if(steps<1) steps = 1; //printf("c=%f d1=%f (%f/%f) d2=%f (%f/%f)\n", c,d1,l->x-l->sx,l->y-l->sy,d2,lastx-l->sx,lasty-l->sy);