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));
delete sepFunc;
sepFunc = NULL;
}
+ } else if (obj.isName("Pattern")) {
+ csObj.free();
+ colorSpace->arrayGet(1, &csObj);
}
obj.free();
}
} else {
goto err1;
}
- if (!ok)
- return;
+ if (!ok) {
+ goto err1;
+ }
// get lookup table for indexed colorspace
if (indexed) {
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()) {
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;