X-Git-Url: http://git.asbjorn.biz/?a=blobdiff_plain;f=pdf2swf%2FSWFOutputDev.cc;h=122e000defeaad94c501755b663d34295b8596ff;hb=2a8029266f97bb442466d36aeb4d57a438941c5f;hp=bffb3b5bcfaf80328f670e5bbd1e64c400949ab2;hpb=9678c99d4d8db8a81dc8b09d2d4e3431d72243ce;p=swftools.git diff --git a/pdf2swf/SWFOutputDev.cc b/pdf2swf/SWFOutputDev.cc index bffb3b5..122e000 100644 --- a/pdf2swf/SWFOutputDev.cc +++ b/pdf2swf/SWFOutputDev.cc @@ -235,6 +235,8 @@ public: int t1id; int jpeginfo; // did we write "Page contains jpegs" yet? int pbminfo; // did we write "Page contains jpegs" yet? + + GfxState *laststate; }; char mybuf[1024]; @@ -619,6 +621,7 @@ void SWFOutputDev::endString(GfxState *state) void SWFOutputDev::startPage(int pageNum, GfxState *state) { double x1,y1,x2,y2; + laststate = state; logf(" startPage %d\n", pageNum); logf(" processing page %d", pageNum); @@ -645,16 +648,16 @@ void SWFOutputDev::drawLink(Link *link, Catalog *catalog) rgb.r = 0; rgb.g = 0; rgb.b = 1; - cvtu2d(this, x1, y1, &x, &y); + cvtUserToDev(x1, y1, &x, &y); points[0].x = points[4].x = (int)x; points[0].y = points[4].y = (int)y; - cvtu2d(this, x2, y1, &x, &y); + cvtUserToDev(x2, y1, &x, &y); points[1].x = (int)x; points[1].y = (int)y; - cvtu2d(this, x2, y2, &x, &y); + cvtUserToDev(x2, y2, &x, &y); points[2].x = (int)x; points[2].y = (int)y; - cvtu2d(this, x1, y2, &x, &y); + cvtUserToDev(x1, y2, &x, &y); points[3].x = (int)x; points[3].y = (int)y; @@ -759,7 +762,7 @@ void SWFOutputDev::drawLink(Link *link, Catalog *catalog) { swfoutput_linktourl(&output, url, points); } - logf(" \"%s\" link to \"%s\" (%d)\n", type, s, page); + logf(" \"%s\" link to \"%s\" (%d)\n", type, s, page); } }