org.apache.fop.image
Class ImageFactory
java.lang.Object
org.apache.fop.image.ImageFactory
public final class ImageFactory
extends java.lang.Object
Create FopImage objects (with a configuration file - not yet implemented).
protected static Log | log - logging instance
|
log
protected static Log log
logging instance
ImageFactory
public ImageFactory()
Main constructor for the ImageFactory.
clearCaches
public void clearCaches()
Forces all the image caches to be cleared. This should normally only be used in
testing environments. If you happen to think that you need to call this yourself
in a production environment, please notify the development team so we can look
into the issue. A call like this shouldn't be necessary anymore like it may have
been with FOP 0.20.5.
getImage
public FopImage getImage(String url,
FOUserAgent context)
Get the image from the cache or load.
If this returns null then the image could not be loaded
due to an error. Messages should be logged.
Before calling this the getURL(url) must be used.
url
- the url for the imagecontext
- the user agent context
getURL
public static String getURL(String href)
Get the url string from a wrapped url.
href
- the input wrapped url
loadImage
public FopImage loadImage(String href,
FOUserAgent ua)
Create an FopImage objects.
href
- the url for the imageua
- the user agent context
releaseImage
public void releaseImage(String url,
FOUserAgent context)
Release an image from the cache.
This can be used if the renderer has its own cache of
the image.
The image should then be put into the weak cache.
url
- the url for the imagecontext
- the user agent context
removeContext
public void removeContext(FOUserAgent context)
Release the context and all images in the context.
context
- the context to remove
Copyright 1999-2007 The Apache Software Foundation. All Rights Reserved.