Package org.apache.fop.util
Class ColorSpaceCache
- java.lang.Object
-
- org.apache.fop.util.ColorSpaceCache
-
public class ColorSpaceCache extends java.lang.Object
Map with cached ICC based ColorSpace objects.
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.Map<java.lang.String,java.awt.color.ColorSpace>
colorSpaceMap
private static org.apache.commons.logging.Log
log
logger instanceprivate InternalResourceResolver
resourceResolver
-
Constructor Summary
Constructors Constructor Description ColorSpaceCache(InternalResourceResolver resourceResolver)
Default constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.awt.color.ColorSpace
get(java.lang.String profileName, java.lang.String iccProfileSrc, org.apache.xmlgraphics.java2d.color.RenderingIntent renderingIntent)
Create (if needed) and return an ICC ColorSpace instance.
-
-
-
Field Detail
-
log
private static org.apache.commons.logging.Log log
logger instance
-
resourceResolver
private InternalResourceResolver resourceResolver
-
colorSpaceMap
private java.util.Map<java.lang.String,java.awt.color.ColorSpace> colorSpaceMap
-
-
Constructor Detail
-
ColorSpaceCache
public ColorSpaceCache(InternalResourceResolver resourceResolver)
Default constructor- Parameters:
resourceResolver
- uri resolver
-
-
Method Detail
-
get
public java.awt.color.ColorSpace get(java.lang.String profileName, java.lang.String iccProfileSrc, org.apache.xmlgraphics.java2d.color.RenderingIntent renderingIntent)
Create (if needed) and return an ICC ColorSpace instance. The ICC profile source is taken from the src attribute of the color-profile FO element. If the ICC ColorSpace is not yet in the cache a new one is created and stored in the cache. The FOP URI resolver is used to try and locate the ICC file. If that fails null is returned.- Parameters:
profileName
- the profile nameiccProfileSrc
- ICC Profile source to return a ColorSpacerenderingIntent
- overriding rendering intent- Returns:
- ICC ColorSpace object or null if ColorSpace could not be created
-
-