diff options
author | Arturo Espinosa <unammx@src.gnome.org> | 1999-08-06 00:14:27 (GMT) |
---|---|---|
committer | Arturo Espinosa <unammx@src.gnome.org> | 1999-08-06 00:14:27 (GMT) |
commit | 50e9d31c05e9ca11ad43cc570556094782c1b956 (patch) | |
tree | e8d30241d1f97d7a52ad4486089a74e55160ad78 /pdf/xpdf/GfxState.cc | |
parent | bd7dce23fec36adeb1713c164d594bbc0436b346 (diff) |
Painful merge.
Painful merge.
I merged the latest release into the CVS.
This version supports the regular xpdf or gpdf if the GNOME libraries
are found.
Miguel.
Diffstat (limited to 'pdf/xpdf/GfxState.cc')
-rw-r--r-- | pdf/xpdf/GfxState.cc | 25 |
1 files changed, 21 insertions, 4 deletions
diff --git a/pdf/xpdf/GfxState.cc b/pdf/xpdf/GfxState.cc index bf0e4de..c1b6090 100644 --- a/pdf/xpdf/GfxState.cc +++ b/pdf/xpdf/GfxState.cc @@ -45,12 +45,12 @@ GfxColorSpace::GfxColorSpace(Object *colorSpace) { ok = gTrue; lookup = NULL; - // check for Separation colorspace + // check for Separation, DeviceN, and Pattern colorspaces colorSpace->copy(&csObj); sepFunc = NULL; if (colorSpace->isArray()) { colorSpace->arrayGet(0, &obj); - if (obj.isName("Separation")) { + if (obj.isName("Separation") || obj.isName("DeviceN")) { csObj.free(); colorSpace->arrayGet(2, &csObj); sepFunc = new Function(colorSpace->arrayGet(3, &obj2)); @@ -59,6 +59,9 @@ GfxColorSpace::GfxColorSpace(Object *colorSpace) { delete sepFunc; sepFunc = NULL; } + } else if (obj.isName("Pattern")) { + csObj.free(); + colorSpace->arrayGet(1, &csObj); } obj.free(); } @@ -80,8 +83,9 @@ GfxColorSpace::GfxColorSpace(Object *colorSpace) { } else { goto err1; } - if (!ok) - return; + if (!ok) { + goto err1; + } // get lookup table for indexed colorspace if (indexed) { @@ -528,6 +532,11 @@ GfxImageColorMap::GfxImageColorMap(int bits1, Object *decode, colorSpace = colorSpace1; mode = colorSpace->getMode(); + // work around a bug in Distiller (?) + if (colorSpace->isIndexed() && maxPixel > colorSpace->getIndexHigh()) { + maxPixel = colorSpace->getIndexHigh(); + } + // get decode map if (decode->isNull()) { if (colorSpace->isIndexed()) { @@ -930,6 +939,14 @@ void GfxState::textShift(double tx) { curY += dy; } +void GfxState::textShift(double tx, double ty) { + double dx, dy; + + textTransformDelta(tx, ty, &dx, &dy); + curX += dx; + curY += dy; +} + GfxState *GfxState::save() { GfxState *newState; |