+#include "SplashTypes.h"
+#include "SplashOutputDev.h"
#include "InfoOutputDev.h"
#include "GfxState.h"
#include "../log.h"
#include <math.h>
-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()
{
return strdup(buf);
}
-
void InfoOutputDev::updateFont(GfxState *state)
{
GfxFont*font = state->getFont();
num_fonts++;
}
currentfont = info;
+
+ splash->doUpdateFont(state);
+ SplashFont* splash_font = splash->font;
+ //printf("%s: %d chars\n", id, splash_font->getNumChars());
}
void InfoOutputDev::drawChar(GfxState *state, double x, double y,
#include "GfxFont.h"
#include "OutputDev.h"
+#include "SplashFont.h"
+#include "SplashOutputDev.h"
#include "GHash.h"
struct FontInfo
{
GHash* id2font;
FontInfo* currentfont;
+ SplashOutputDev*splash;
public:
int x1,y1,x2,y2;
int num_links;
int num_images;
int num_fonts;
- InfoOutputDev();
- virtual ~InfoOutputDev();
+ InfoOutputDev(XRef*xref);
+ virtual ~InfoOutputDev();
virtual GBool upsideDown();
virtual GBool useDrawChar();
virtual GBool interpretType3Chars();