X-Git-Url: http://git.asbjorn.biz/?p=swftools.git;a=blobdiff_plain;f=lib%2Fpdf%2FGFXOutputDev.cc;h=05c1b4884ffcb22b6a4c9b0d200fbaad0d6cadc4;hp=13f70877cc5e3f2450fce79a1bdcb64a3cad2be7;hb=6f78b0ef3998e959ce09c5ef11d46149756b682b;hpb=9e1987ca321def20b6f756bb5955d41c78c45c05 diff --git a/lib/pdf/GFXOutputDev.cc b/lib/pdf/GFXOutputDev.cc index 13f7087..05c1b48 100644 --- a/lib/pdf/GFXOutputDev.cc +++ b/lib/pdf/GFXOutputDev.cc @@ -1626,7 +1626,7 @@ void GFXOutputDev::endType3Char(GfxState *state) msg(" endType3Char"); } -void GFXOutputDev::startPage(int pageNum, GfxState *state, double crop_x1, double crop_y1, double crop_x2, double crop_y2) +void GFXOutputDev::startPage(int pageNum, GfxState *state) { this->currentpage = pageNum; double x1,y1,x2,y2; @@ -1635,6 +1635,7 @@ void GFXOutputDev::startPage(int pageNum, GfxState *state, double crop_x1, doubl gfxcolor_t black = {255,0,0,0}; laststate = state; gfxline_t clippath[5]; + PDFRectangle *r = this->page->getCropBox(); /* state->transform(state->getX1(),state->getY1(),&x1,&y1); state->transform(state->getX2(),state->getY2(),&x2,&y2); @@ -1645,8 +1646,8 @@ void GFXOutputDev::startPage(int pageNum, GfxState *state, double crop_x1, doubl y1 = crop_y1; x2 = crop_x2; y2 = crop_y2;*/ - state->transform(crop_x1,crop_y1,&x1,&y1); //x1 += user_movex; y1 += user_movey; - state->transform(crop_x2,crop_y2,&x2,&y2); //x2 += user_movex; y2 += user_movey; + state->transform(r->x1,r->y1,&x1,&y1); //x1 += user_movex; y1 += user_movey; + state->transform(r->x2,r->y2,&x2,&y2); //x2 += user_movex; y2 += user_movey; if(x2get(belowresult,"page0"); - //writePNG("below.png", (unsigned char*)belowimg->data, belowimg->width, belowimg->height); + //png_write("below.png", (unsigned char*)belowimg->data, belowimg->width, belowimg->height); gfxdevice_t maskrender; gfxdevice_render_init(&maskrender);