X-Git-Url: http://git.asbjorn.it/?a=blobdiff_plain;f=pdf2swf%2Fswfoutput.cc;h=632a9ffb14de3329cf895c58a3ba5f3b0f7522da;hb=a5f30106ff40ee49ec2c93c76619040b6ece27ec;hp=301f80899c661a490f7b252d10a8a653db033c08;hpb=979c1dc6e9391d5c29b8b48f8ebfb5d52600f6f5;p=swftools.git diff --git a/pdf2swf/swfoutput.cc b/pdf2swf/swfoutput.cc index 301f808..632a9ff 100644 --- a/pdf2swf/swfoutput.cc +++ b/pdf2swf/swfoutput.cc @@ -1332,7 +1332,8 @@ void swf_drawlink(gfxdevice_t*dev, gfxline_t*points, char*url) if(url[t]<'0' || url[t]>'9') nodigit = 1; if(!nodigit) { - int page = atoi(&url[4]); + int page = atoi(&url[4]) - 1; + if(page<0) page = 0; swfoutput_linktopage(dev, page, points); } } else { @@ -1706,7 +1707,7 @@ static ArtVpath* gfxline_to_ArtVpath(gfxline_t*line) double x=0,y=0; /* factor which determines into how many line fragments a spline is converted */ - double subfraction = 1.2;//0.3 + double subfraction = 2.4;//0.3 l2 = line; while(l2) { @@ -1857,8 +1858,6 @@ static int add_image(swfoutput_internal*i, gfximage_t*img, int targetwidth, int return -1; /* TODO: cache images */ - *newwidth = sizex; - *newheight = sizey; if(newsizex Scaling %dx%d image to %dx%d", sizex, sizey, newsizex, newsizey); @@ -1866,7 +1865,9 @@ static int add_image(swfoutput_internal*i, gfximage_t*img, int targetwidth, int *newwidth = sizex = newsizex; *newheight = sizey = newsizey; mem = newpic; - + } else { + *newwidth = newsizex = sizex; + *newheight = newsizey = sizey; } int num_colors = swf_ImageGetNumberOfPaletteEntries(mem,sizex,sizey,0);