X-Git-Url: http://git.asbjorn.biz/?p=swftools.git;a=blobdiff_plain;f=lib%2Fpdf%2FBitmapOutputDev.cc;h=c9bcbb2686ea3ad984f9d5033a7d11217f780a31;hp=e1cb3d33b8d4f3d5e990c0428def02c762186a8b;hb=4374572fb79cbe25bdd1498802605db5dfc908a6;hpb=c8475af85654a00cf17754517b54f089a4044ab1 diff --git a/lib/pdf/BitmapOutputDev.cc b/lib/pdf/BitmapOutputDev.cc index e1cb3d3..c9bcbb2 100644 --- a/lib/pdf/BitmapOutputDev.cc +++ b/lib/pdf/BitmapOutputDev.cc @@ -216,8 +216,8 @@ void BitmapOutputDev::flushBitmap() /* clip against (-movex, -movey, -movex+width, -movey+height) */ if(xmin < -this->movex) xmin = -this->movex; if(ymin < -this->movey) ymin = -this->movey; - if(xmax > -this->movex + width) xmax = -this->movex+this->width; - if(ymax > -this->movey + height) ymax = -this->movey+this->height; + if(xmax > -this->movex + this->width) xmax = -this->movex+this->width; + if(ymax > -this->movey + this->height) ymax = -this->movey+this->height; msg(" Flushing bitmap (bbox: %d,%d,%d,%d)", xmin,ymin,xmax,ymax); @@ -468,13 +468,35 @@ static void update_bitmap(SplashBitmap*bitmap, SplashBitmap*update, int x1, int u += width8; } } else { - int x,y; - for(y=0;ywidth = (int)(x2-x1); this->height = (int)(y2-y1); - msg(" startPage"); rgbdev->startPage(pageNum, state, crop_x1, crop_y1, crop_x2, crop_y2); boolpolydev->startPage(pageNum, state, crop_x1, crop_y1, crop_x2, crop_y2); booltextdev->startPage(pageNum, state, crop_x1, crop_y1, crop_x2, crop_y2); @@ -837,6 +858,8 @@ void BitmapOutputDev::startPage(int pageNum, GfxState *state, double crop_x1, do booltextbitmap = booltextdev->getBitmap(); staletextbitmap = new SplashBitmap(booltextbitmap->getWidth(), booltextbitmap->getHeight(), 1, booltextbitmap->getMode(), 0); assert(staletextbitmap->getRowSize() == booltextbitmap->getRowSize()); + + msg(" startPage %dx%d (%dx%d)", this->width, this->height, booltextbitmap->getWidth(), booltextbitmap->getHeight()); clip0bitmap = clip0dev->getBitmap(); clip1bitmap = clip1dev->getBitmap();