aboutsummaryrefslogtreecommitdiffstats
path: root/src/java/org/apache/fop/render/pcl/PCLPainter.java
diff options
context:
space:
mode:
authorSimon Steiner <ssteiner@apache.org>2016-01-18 13:47:43 +0000
committerSimon Steiner <ssteiner@apache.org>2016-01-18 13:47:43 +0000
commit5415b5105bebd35052a0ebb3bd101d40893986ef (patch)
tree13c049c3c3b6d594b8b060c5ce1c246d7789a810 /src/java/org/apache/fop/render/pcl/PCLPainter.java
parent58fba2eb411a57bd075d6fa55e14eb2b622f0dc4 (diff)
downloadxmlgraphics-fop-5415b5105bebd35052a0ebb3bd101d40893986ef.tar.gz
xmlgraphics-fop-5415b5105bebd35052a0ebb3bd101d40893986ef.zip
FOP-2309: Support PCL Color thanks to James Burton
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@1725271 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/java/org/apache/fop/render/pcl/PCLPainter.java')
-rw-r--r--src/java/org/apache/fop/render/pcl/PCLPainter.java14
1 files changed, 11 insertions, 3 deletions
diff --git a/src/java/org/apache/fop/render/pcl/PCLPainter.java b/src/java/org/apache/fop/render/pcl/PCLPainter.java
index 69465a7fd..65e996d08 100644
--- a/src/java/org/apache/fop/render/pcl/PCLPainter.java
+++ b/src/java/org/apache/fop/render/pcl/PCLPainter.java
@@ -211,7 +211,7 @@ public class PCLPainter extends AbstractIFPainter<PCLDocumentHandler> implements
}
try {
setCursorPos(rect.x, rect.y);
- gen.fillRect(rect.width, rect.height, fillColor);
+ gen.fillRect(rect.width, rect.height, fillColor, getPCLUtil().isColorEnabled());
} catch (IOException ioe) {
throw new IFException("I/O error in fillRect()", ioe);
}
@@ -410,7 +410,11 @@ public class PCLPainter extends AbstractIFPainter<PCLDocumentHandler> implements
Color textColor = state.getTextColor();
if (textColor != null) {
gen.setTransparencyMode(true, false);
- gen.selectGrayscale(textColor);
+ if (getDocumentHandler().getPCLUtil().isColorEnabled()) {
+ gen.selectColor(textColor);
+ } else {
+ gen.selectGrayscale(textColor);
+ }
}
gen.setTransparencyMode(true, true);
@@ -492,7 +496,11 @@ public class PCLPainter extends AbstractIFPainter<PCLDocumentHandler> implements
Color textColor = state.getTextColor();
if (textColor != null) {
gen.setTransparencyMode(true, false);
- gen.selectGrayscale(textColor);
+ if (getDocumentHandler().getPCLUtil().isColorEnabled()) {
+ gen.selectColor(textColor);
+ } else {
+ gen.selectGrayscale(textColor);
+ }
}
if (x != -1 && y != -1) {