diff options
author | Jeremias Maerki <jeremias@apache.org> | 2008-11-04 15:10:31 +0000 |
---|---|---|
committer | Jeremias Maerki <jeremias@apache.org> | 2008-11-04 15:10:31 +0000 |
commit | dfeb96c655c3e361b5fdf6f0cecbf46adab01a72 (patch) | |
tree | 27998c349075184f8f0d20a23602fa2732aee171 /src/java/org/apache/fop/render/AbstractRenderingContext.java | |
parent | a4847a2df3717f54d54e3c914826e3ce0bb2dd28 (diff) | |
download | xmlgraphics-fop-dfeb96c655c3e361b5fdf6f0cecbf46adab01a72.tar.gz xmlgraphics-fop-dfeb96c655c3e361b5fdf6f0cecbf46adab01a72.zip |
Making conversion hints available to ImageHandler implementations, too.
(Re-)implemented Graphics2D support for PCL. It can be disabled by fox:conversion-mode="bitmap" if necessary.
Fixed a bug with non-uniform image scaling when encoding bitmap images.
Commented some code that did not reliably convert color images to grayscale. The (probably slower) fallback code is used instead.
Some performance improvements for text painting using bitmaps when <rendering>speed<rendering> is selected.
Removed the RenderingContext interface from RendererContext since it's not used.
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/branches/Temp_AreaTreeNewDesign@711269 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/java/org/apache/fop/render/AbstractRenderingContext.java')
-rw-r--r-- | src/java/org/apache/fop/render/AbstractRenderingContext.java | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/src/java/org/apache/fop/render/AbstractRenderingContext.java b/src/java/org/apache/fop/render/AbstractRenderingContext.java index 7bacac58d..365fec871 100644 --- a/src/java/org/apache/fop/render/AbstractRenderingContext.java +++ b/src/java/org/apache/fop/render/AbstractRenderingContext.java @@ -19,6 +19,9 @@ package org.apache.fop.render; +import java.util.Collections; +import java.util.Map; + import org.apache.fop.apps.FOUserAgent; /** @@ -27,6 +30,7 @@ import org.apache.fop.apps.FOUserAgent; public abstract class AbstractRenderingContext implements RenderingContext { private FOUserAgent userAgent; + private Map hints; /** * Main constructor. @@ -45,5 +49,33 @@ public abstract class AbstractRenderingContext implements RenderingContext { return userAgent; } + /** {@inheritDoc} */ + public void putHints(Map hints) { + if (hints == null) { + return; + } + if (this.hints == null) { + this.hints = new java.util.HashMap(); + } + this.hints.putAll(hints); + } + + /** {@inheritDoc} */ + public Map getHints() { + if (this.hints == null) { + return Collections.EMPTY_MAP; + } else { + return Collections.unmodifiableMap(this.hints); + } + } + + /** {@inheritDoc} */ + public Object getHint(Object key) { + if (this.hints == null) { + return null; + } else { + return this.hints.get(key); + } + } } |