diff options
author | Albert Astals Cid <aacid@kde.org> | 2010-09-21 19:07:12 +0100 |
---|---|---|
committer | Albert Astals Cid <aacid@kde.org> | 2010-09-21 19:24:40 +0100 |
commit | a40449fabb4ccfb3bad2ad599cd0d4ab53ee8cbd (patch) | |
tree | 556e860573861ce6d61c27ee89aa2f3747f44cb3 | |
parent | 7b93fb7ed3eb3317b97317008bea2ff858901706 (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.cc | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/poppler/Gfx.cc b/poppler/Gfx.cc index 919086e0..7b85d79a 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); |