X-Git-Url: http://git.asbjorn.biz/?a=blobdiff_plain;f=lib%2Fpdf%2FBitmapOutputDev.cc;h=5292f1a726e12a6c33fe5ea491360a2f82178e43;hb=52b159e163d2489db8aceb43a823d1d6bfc9b94e;hp=6ed165d0ca3c31f9be1e93c3ef933306eb423362;hpb=c2a1de276f2c4e97ce8e017fab038e99bcea72aa;p=swftools.git diff --git a/lib/pdf/BitmapOutputDev.cc b/lib/pdf/BitmapOutputDev.cc index 6ed165d..5292f1a 100644 --- a/lib/pdf/BitmapOutputDev.cc +++ b/lib/pdf/BitmapOutputDev.cc @@ -269,6 +269,8 @@ void BitmapOutputDev::flushBitmap() m.ty = ymin; m.m00 = m.m11 = 1; m.m10 = m.m01 = 0; + m.tx -= 0.5; + m.ty -= 0.5; gfxline_t* line = gfxline_makerectangle(xmin, ymin, xmax, ymax); dev->fillbitmap(dev, line, img, &m, 0); @@ -1262,6 +1264,11 @@ void BitmapOutputDev::drawChar(GfxState *state, double x, double y, /* calculate the bbox of this character */ int x1 = (int)x, x2 = (int)x+1, y1 = (int)y, y2 = (int)y+1; SplashPath*path = clip0dev->getCurrentFont()->getGlyphPath(code); + if(!path) { + if(code) + msg(" couldn't create outline for char %d", code); + return; + } int t; for(t=0;tgetLength();t++) { double xx,yy;