- FPOINT* pos = draw->pos;
- FPOINT c1,c2;
- c1.x = (pos->x + 2 * c->x) / 3;
- c1.y = (pos->y + 2 * c->y) / 3;
- c2.x = (2 * c->x + to->x) / 3;
- c2.y = (2 * c->y + to->y) / 3;
- swf_DrawerCubicTo(draw, &c1,&c2,to);
- draw->pos = to;
- return 0;
+ SWFSHAPEDRAWER*sdraw = (SWFSHAPEDRAWER*)draw->internal;
+ int tx = c1->x*20;
+ int ty = c1->y*20;
+ int x = to->x*20;
+ int y = to->y*20;
+ if(sdraw->lastx < sdraw->bbox.xmin) sdraw->bbox.xmin = sdraw->lastx;
+ if(sdraw->lasty < sdraw->bbox.ymin) sdraw->bbox.ymin = sdraw->lasty;
+ if(sdraw->lastx > sdraw->bbox.xmax) sdraw->bbox.xmax = sdraw->lastx;
+ if(sdraw->lasty > sdraw->bbox.ymax) sdraw->bbox.ymax = sdraw->lasty;
+ if(x < sdraw->bbox.xmin) sdraw->bbox.xmin = x;
+ if(y < sdraw->bbox.ymin) sdraw->bbox.ymin = y;
+ if(x > sdraw->bbox.xmax) sdraw->bbox.xmax = x;
+ if(y > sdraw->bbox.ymax) sdraw->bbox.ymax = y;
+ if(tx < sdraw->bbox.xmin) sdraw->bbox.xmin = tx;
+ if(ty < sdraw->bbox.ymin) sdraw->bbox.ymin = ty;
+ if(tx > sdraw->bbox.xmax) sdraw->bbox.xmax = tx;
+ if(ty > sdraw->bbox.ymax) sdraw->bbox.ymax = ty;
+ swf_ShapeSetCurve(sdraw->tag,sdraw->shape, tx-sdraw->lastx,ty-sdraw->lasty, x-tx,y-ty);
+ sdraw->lastx = x;
+ sdraw->lasty = y;
+ draw->pos = *to;