git.asbjorn.biz
/
swftools.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
optimizations and bugfixes for finally
[swftools.git]
/
lib
/
pdf
/
GFXOutputDev.cc
diff --git
a/lib/pdf/GFXOutputDev.cc
b/lib/pdf/GFXOutputDev.cc
index
e0ade7f
..
940f5a0
100644
(file)
--- a/
lib/pdf/GFXOutputDev.cc
+++ b/
lib/pdf/GFXOutputDev.cc
@@
-575,6
+575,7
@@
GFXOutputDev::GFXOutputDev(InfoOutputDev*info, PDFDoc*doc)
this->config_multiply = 1;
this->gfxfontlist = gfxfontlist_create();
this->config_multiply = 1;
this->gfxfontlist = gfxfontlist_create();
+ this->dashPattern = 0;
memset(states, 0, sizeof(states));
this->featurewarnings = 0;
memset(states, 0, sizeof(states));
this->featurewarnings = 0;
@@
-1090,6
+1091,8
@@
void GFXOutputDev::strokeGfxline(GfxState *state, gfxline_t*line, int flags)
msg("<trace> | phase: %f", this->dashStart);
for(t=0;t<this->dashLength;t++) {
dash[t] = (float)this->dashPattern[t] * f;
msg("<trace> | phase: %f", this->dashStart);
for(t=0;t<this->dashLength;t++) {
dash[t] = (float)this->dashPattern[t] * f;
+ if(!dash[t])
+ dash[t] = 1e-37;
msg("<trace> | d%-3d: %f", t, this->dashPattern[t]);
}
dash[this->dashLength] = -1;
msg("<trace> | d%-3d: %f", t, this->dashPattern[t]);
}
dash[this->dashLength] = -1;
@@
-1370,7
+1373,7
@@
void GFXOutputDev::drawChar(GfxState *state, double x, double y,
gfxmatrix_t m = this->current_font_matrix;
this->transformXY(state, x-originX, y-originY, &m.tx, &m.ty);
gfxmatrix_t m = this->current_font_matrix;
this->transformXY(state, x-originX, y-originY, &m.tx, &m.ty);
- m.tx += originX; m.ty += originY;
+ //m.tx += originX; m.ty += originY;
if(render == RENDER_FILL || render == RENDER_INVISIBLE) {
device->drawchar(device, current_gfxfont, glyphid, &col, &m);
if(render == RENDER_FILL || render == RENDER_INVISIBLE) {
device->drawchar(device, current_gfxfont, glyphid, &col, &m);
@@
-2173,7
+2176,7
@@
void GFXOutputDev::drawGeneralImage(GfxState *state, Object *ref, Stream *str,
imgStr = new ImageStream(str, width, ncomps,bits);
imgStr->reset();
imgStr = new ImageStream(str, width, ncomps,bits);
imgStr->reset();
- if(!width || !height || (height<=1 && width<=1 && maskWidth<=1 && maskHeight<=1))
+ if(!width || !height || ((height+width)<=1 && (maskWidth+maskHeight)<=1))
{
msg("<verbose> Ignoring %d by %d image", width, height);
unsigned char buf[8];
{
msg("<verbose> Ignoring %d by %d image", width, height);
unsigned char buf[8];