X-Git-Url: http://git.asbjorn.biz/?a=blobdiff_plain;f=lib%2Fpdf%2FInfoOutputDev.cc;h=7c83566ab4d4dc2f1ab05403fbf63cbd402490ec;hb=4af346b956d4922d0ea6322e3e1f52ec1beff2d7;hp=6574d76fcc4c22b4c8a3e4cc95659fab639e280e;hpb=e0f1832e0ff5bc24a47fe86ceefe0275c633af7c;p=swftools.git diff --git a/lib/pdf/InfoOutputDev.cc b/lib/pdf/InfoOutputDev.cc index 6574d76..7c83566 100644 --- a/lib/pdf/InfoOutputDev.cc +++ b/lib/pdf/InfoOutputDev.cc @@ -1,14 +1,19 @@ +#include "SplashTypes.h" +#include "SplashOutputDev.h" #include "InfoOutputDev.h" #include "GfxState.h" #include "../log.h" #include -InfoOutputDev::InfoOutputDev() +InfoOutputDev::InfoOutputDev(XRef*xref) { num_links = 0; num_images = 0; num_fonts = 0; id2font = new GHash(); + SplashColor white = {255,255,255}; + //splash = new SplashOutputDev(splashModeRGB8,320,0,white,0,0); + //splash->startDoc(xref); } InfoOutputDev::~InfoOutputDev() { @@ -17,6 +22,7 @@ InfoOutputDev::~InfoOutputDev() GBool InfoOutputDev::upsideDown() {return gTrue;} GBool InfoOutputDev::useDrawChar() {return gTrue;} GBool InfoOutputDev::interpretType3Chars() {return gTrue;} +GBool InfoOutputDev::useTilingPatternFill() {return gTrue;} void InfoOutputDev::startPage(int pageNum, GfxState *state, double crop_x1, double crop_y1, double crop_x2, double crop_y2) { double x1,y1,x2,y2; @@ -28,6 +34,7 @@ void InfoOutputDev::startPage(int pageNum, GfxState *state, double crop_x1, doub this->y1 = (int)y1; this->x2 = (int)x2; this->y2 = (int)y2; + msg(" Generating info structure for page %d", pageNum); } void InfoOutputDev::drawLink(Link *link, Catalog *catalog) { @@ -57,7 +64,6 @@ static char*getFontID(GfxFont*font) return strdup(buf); } - void InfoOutputDev::updateFont(GfxState *state) { GfxFont*font = state->getFont(); @@ -76,6 +82,11 @@ void InfoOutputDev::updateFont(GfxState *state) num_fonts++; } currentfont = info; + + //splash->doUpdateFont(state); + //SplashFont* splash_font = splash->getCurrentFont(); + + //printf("%s: %d chars\n", id, splash_font->getNumChars()); } void InfoOutputDev::drawChar(GfxState *state, double x, double y, @@ -102,11 +113,31 @@ void InfoOutputDev::drawImageMask(GfxState *state, Object *ref, Stream *str, GBool inlineImg) { num_images++; + OutputDev::drawImageMask(state,ref,str,width,height,invert,inlineImg); } void InfoOutputDev::drawImage(GfxState *state, Object *ref, Stream *str, int width, int height, GfxImageColorMap *colorMap, int *maskColors, GBool inlineImg) { num_images++; + OutputDev::drawImage(state,ref,str,width,height,colorMap,maskColors,inlineImg); +} +void InfoOutputDev::drawMaskedImage(GfxState *state, Object *ref, Stream *str, + int width, int height, + GfxImageColorMap *colorMap, + Stream *maskStr, + int maskWidth, int maskHeight, + GBool maskInvert) +{ + OutputDev::drawMaskedImage(state,ref,str,width,height,colorMap,maskStr,maskWidth,maskHeight,maskInvert); } +void InfoOutputDev::drawSoftMaskedImage(GfxState *state, Object *ref, Stream *str, + int width, int height, + GfxImageColorMap *colorMap, + Stream *maskStr, + int maskWidth, int maskHeight, + GfxImageColorMap *maskColorMap) +{ + OutputDev::drawSoftMaskedImage(state,ref,str,width,height,colorMap,maskStr,maskWidth,maskHeight,maskColorMap); +}