summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlbert Astals Cid <aacid@kde.org>2010-09-21 18:07:12 (GMT)
committerAlbert Astals Cid <aacid@kde.org>2010-09-21 18:07:12 (GMT)
commitdfdf3602bde47d1be7788a44722c258bfa0c6d6e (patch)
treec32482277a34b9bb82b819c8794593e523f5cb0f
parent01c85c08305bae16242f5979ab107fa5bb5f5100 (diff)
Give a value to color.c[i]
Might not be the better solution but it's better than having a random value there Found thanks to PDF provided by Joel Voss of Leviathan Security Group
-rw-r--r--poppler/Gfx.cc8
1 files changed, 8 insertions, 0 deletions
diff --git a/poppler/Gfx.cc b/poppler/Gfx.cc
index 919086e..7b85d79 100644
--- a/poppler/Gfx.cc
+++ b/poppler/Gfx.cc
@@ -1533,6 +1533,8 @@ void Gfx::opSetFillColorN(Object args[], int numArgs) {
for (i = 0; i < numArgs - 1 && i < gfxColorMaxComps; ++i) {
if (args[i].isNum()) {
color.c[i] = dblToCol(args[i].getNum());
+ } else {
+ color.c[i] = 0; // TODO Investigate if this is what Adobe does
}
}
state->setFillColor(&color);
@@ -1552,6 +1554,8 @@ void Gfx::opSetFillColorN(Object args[], int numArgs) {
for (i = 0; i < numArgs && i < gfxColorMaxComps; ++i) {
if (args[i].isNum()) {
color.c[i] = dblToCol(args[i].getNum());
+ } else {
+ color.c[i] = 0; // TODO Investigate if this is what Adobe does
}
}
state->setFillColor(&color);
@@ -1576,6 +1580,8 @@ void Gfx::opSetStrokeColorN(Object args[], int numArgs) {
for (i = 0; i < numArgs - 1 && i < gfxColorMaxComps; ++i) {
if (args[i].isNum()) {
color.c[i] = dblToCol(args[i].getNum());
+ } else {
+ color.c[i] = 0; // TODO Investigate if this is what Adobe does
}
}
state->setStrokeColor(&color);
@@ -1595,6 +1601,8 @@ void Gfx::opSetStrokeColorN(Object args[], int numArgs) {
for (i = 0; i < numArgs && i < gfxColorMaxComps; ++i) {
if (args[i].isNum()) {
color.c[i] = dblToCol(args[i].getNum());
+ } else {
+ color.c[i] = 0; // TODO Investigate if this is what Adobe does
}
}
state->setStrokeColor(&color);