X-Git-Url: http://git.asbjorn.biz/?a=blobdiff_plain;f=lib%2Fpdf%2FGFXOutputDev.cc;h=c88a0357ac96f8b8857f8a82263f3cc7c297d91b;hb=3b832e4acc0935db344691e2c0e2db6a8e447187;hp=fed1333d2920691f9ac5997c1fc1c308df1c4f58;hpb=f93b6225b484a80698e57945a84c3fc8c524a9a0;p=swftools.git diff --git a/lib/pdf/GFXOutputDev.cc b/lib/pdf/GFXOutputDev.cc index fed1333..c88a035 100644 --- a/lib/pdf/GFXOutputDev.cc +++ b/lib/pdf/GFXOutputDev.cc @@ -1083,8 +1083,6 @@ void GFXOutputDev::strokeGfxline(GfxState *state, gfxline_t*line, int flags) this->transformXY(state, 1, 1, &tx2, &ty2); double f = sqrt(sqr(tx2-tx1)+sqr(ty2-ty1)) / SQRT2; - f = 1.0; //disable dash length transform for now - msg(" %d dashes", this->dashLength); msg(" | phase: %f", this->dashStart); for(t=0;tdashLength;t++) { @@ -1974,19 +1972,23 @@ unsigned char* antialize(unsigned char*data, int width, int height, int newwidth double ex = px + fx; int fromx = (int)px; int tox = (int)ex; - int xweight1 = (int)(((fromx+1)-px)*256); + int xweight1 = (int)((1-(px-fromx))*256); int xweight2 = (int)((ex-tox)*256); double py =0; for(y=0;y=width) + tox = width-1; + if(toy>=height) + toy = height-1; + for(xx=fromx;xx<=tox;xx++) + for(yy=fromy;yy<=toy;yy++) { int b = 1-data[width*yy+xx]; int weight=256; if(xx==fromx) weight = (weight*xweight1)/256;