git.asbjorn.biz
/
swftools.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fixed bounding box bug
[swftools.git]
/
lib
/
gfxtools.c
diff --git
a/lib/gfxtools.c
b/lib/gfxtools.c
index
1e3c1aa
..
296bea1
100644
(file)
--- a/
lib/gfxtools.c
+++ b/
lib/gfxtools.c
@@
-473,8
+473,8
@@
void gfxdraw_cubicTo(gfxdrawer_t*draw, double c1x, double c1y, double c2x, doubl
num = approximate3(&c, q, 128, maxerror*maxerror);
for(t=0;t<num;t++) {
num = approximate3(&c, q, 128, maxerror*maxerror);
for(t=0;t<num;t++) {
- FPOINT mid;
- FPOINT to;
+ gfxpoint_t mid;
+ gfxpoint_t to;
mid.x = q[t].control.x;
mid.y = q[t].control.y;
to.x = q[t].end.x;
mid.x = q[t].control.x;
mid.y = q[t].control.y;
to.x = q[t].end.x;
@@
-485,7
+485,7
@@
void gfxdraw_cubicTo(gfxdrawer_t*draw, double c1x, double c1y, double c2x, doubl
gfxbbox_t gfxbbox_expand_to_point(gfxbbox_t box, gfxcoord_t x, gfxcoord_t y)
{
gfxbbox_t gfxbbox_expand_to_point(gfxbbox_t box, gfxcoord_t x, gfxcoord_t y)
{
- if(box.xmin==0 || box.ymin==0 || box.xmax==0 || box.ymax==0) {
+ if(box.xmin==0 && box.ymin==0 && box.xmax==0 && box.ymax==0) {
box.xmin = x;
box.ymin = y;
box.xmax = x;
box.xmin = x;
box.ymin = y;
box.xmax = x;
@@
-523,7
+523,7
@@
gfxbbox_t gfxline_getbbox(gfxline_t*line)
last = 0;
}
x = line->x;
last = 0;
}
x = line->x;
- y = line->x;
+ y = line->y;
line = line->next;
}
return bbox;
line = line->next;
}
return bbox;