git.asbjorn.biz
/
swftools.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
d047ab5
)
added experimental splashoutputdev code
author
kramm
<kramm>
Sun, 9 Sep 2007 17:53:23 +0000
(17:53 +0000)
committer
kramm
<kramm>
Sun, 9 Sep 2007 17:53:23 +0000
(17:53 +0000)
lib/pdf/InfoOutputDev.cc
patch
|
blob
|
history
lib/pdf/InfoOutputDev.h
patch
|
blob
|
history
diff --git
a/lib/pdf/InfoOutputDev.cc
b/lib/pdf/InfoOutputDev.cc
index
830776d
..
2bcbdaa
100644
(file)
--- 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 <math.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();
{
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()
{
}
InfoOutputDev::~InfoOutputDev()
{
@@
-58,7
+63,6
@@
static char*getFontID(GfxFont*font)
return strdup(buf);
}
return strdup(buf);
}
-
void InfoOutputDev::updateFont(GfxState *state)
{
GfxFont*font = state->getFont();
void InfoOutputDev::updateFont(GfxState *state)
{
GfxFont*font = state->getFont();
@@
-77,6
+81,10
@@
void InfoOutputDev::updateFont(GfxState *state)
num_fonts++;
}
currentfont = info;
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,
}
void InfoOutputDev::drawChar(GfxState *state, double x, double y,
diff --git
a/lib/pdf/InfoOutputDev.h
b/lib/pdf/InfoOutputDev.h
index
82fa082
..
deed876
100644
(file)
--- a/
lib/pdf/InfoOutputDev.h
+++ b/
lib/pdf/InfoOutputDev.h
@@
-3,6
+3,8
@@
#include "GfxFont.h"
#include "OutputDev.h"
#include "GfxFont.h"
#include "OutputDev.h"
+#include "SplashFont.h"
+#include "SplashOutputDev.h"
#include "GHash.h"
struct FontInfo
#include "GHash.h"
struct FontInfo
@@
-15,14
+17,15
@@
class InfoOutputDev: public OutputDev
{
GHash* id2font;
FontInfo* currentfont;
{
GHash* id2font;
FontInfo* currentfont;
+ SplashOutputDev*splash;
public:
int x1,y1,x2,y2;
int num_links;
int num_images;
int num_fonts;
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();
virtual GBool upsideDown();
virtual GBool useDrawChar();
virtual GBool interpretType3Chars();