-static void free_outline(SWF_OUTLINE*outline)
-{
- while(outline) {
- SWF_OUTLINE*next = outline->link;
- free(outline);
- outline = next;
- }
-}
-
-static void dump_outline(SWF_OUTLINE*outline)
-{
- double x=0,y=0;
- while(outline) {
- double lastx=x,lasty=y;
- x += (outline->dest.x/(float)0xffff);
- y += (outline->dest.y/(float)0xffff);
- if(outline->type == SWF_PATHTYPE_MOVE) {
- msg("<trace> | moveto %f,%f", x,y);
- } else if(outline->type == SWF_PATHTYPE_LINE) {
- msg("<trace> | lineto: %f,%f\n",x,y);
- } else if(outline->type == SWF_PATHTYPE_BEZIER) {
- SWF_BEZIERSEGMENT*o2 = (SWF_BEZIERSEGMENT*)outline;
- float x1 = o2->C.x/(float)0xffff+lastx;
- float y1 = o2->C.y/(float)0xffff+lasty;
- float x2 = o2->B.x/(float)0xffff+lastx;
- float y2 = o2->B.y/(float)0xffff+lasty;
- msg("<trace> | spline: %f,%f -> %f,%f -> %f,%f\n",x1,y1,x2,y2,x,y);
- }
- outline = outline->link;
- }
-}
-
-SWF_OUTLINE* gfxPath_to_SWF_OUTLINE(GfxState*state, GfxPath*path)