git.asbjorn.biz
/
swftools.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
854148c
)
bugfix in spline conversion
author
kramm
<kramm>
Sun, 19 Nov 2006 21:26:34 +0000
(21:26 +0000)
committer
kramm
<kramm>
Sun, 19 Nov 2006 21:26:34 +0000
(21:26 +0000)
lib/devices/opengl.c
patch
|
blob
|
history
diff --git
a/lib/devices/opengl.c
b/lib/devices/opengl.c
index
aee8be8
..
a9459a1
100644
(file)
--- 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) {
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;
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;
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);
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);