X-Git-Url: http://git.asbjorn.biz/?a=blobdiff_plain;f=lib%2Fpdf%2FBitmapOutputDev.cc;h=19a52f38f26bddaca44faab231d3b91dff855b72;hb=17264d2dc6d4d56a5e4fe5f1ad721142d397ea0b;hp=4b2a33432f8d667cc03de63c91f866ac9188a142;hpb=7ff0a634c656a09f58162ddc57795e30400cdde9;p=swftools.git diff --git a/lib/pdf/BitmapOutputDev.cc b/lib/pdf/BitmapOutputDev.cc index 4b2a334..19a52f3 100644 --- a/lib/pdf/BitmapOutputDev.cc +++ b/lib/pdf/BitmapOutputDev.cc @@ -29,6 +29,7 @@ #include "../log.h" #include "../png.h" #include "../devices/record.h" +#include "../types.h" #define UNKNOWN_BOUNDING_BOX 0,0,0,0 @@ -604,7 +605,7 @@ GBool BitmapOutputDev::intersection(int x1, int y1, int x2, int y2) unsigned long long int c=0; assert(sizeof(unsigned long long int)==8); { - if(((int)polypixels&7) || ((int)textpixels&7)) { + if(((ptroff_t)polypixels&7) || ((ptroff_t)textpixels&7)) { //msg(" Non-optimal alignment"); } int l2 = len; @@ -1264,6 +1265,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;