org.apache.fop.render.pdf

Class AbstractImageAdapter

Implemented Interfaces:
PDFImage
Known Direct Subclasses:
ImageRawCCITTFaxAdapter, ImageRawJPEGAdapter, ImageRenderedAdapter

public abstract class AbstractImageAdapter
extends java.lang.Object
implements PDFImage

Abstract PDFImage implementation for the PDF renderer.

Field Summary

protected Image
image
the image

Constructor Summary

AbstractImageAdapter(Image image, String key)
Creates a new PDFImage from an Image instance.

Method Summary

int
getHeight()
PDFICCStream
getICCStream()
protected ColorSpace
getImageColorSpace()
Returns the image's color space.
String
getKey()
String
getMask()
String
getSoftMask()
PDFReference
getSoftMaskReference()
PDFColor
getTransparentColor()
int
getWidth()
boolean
isInverted()
boolean
isPS()
boolean
isTransparent()
void
populateXObjectDictionary(PDFDictionary dict)
void
setup(PDFDocument doc)
static PDFDeviceColorSpace
toPDFColorSpace(ColorSpace cs)
Converts a ColorSpace object to a PDFColorSpace object.

Field Details

image

protected Image image
the image

Constructor Details

AbstractImageAdapter

public AbstractImageAdapter(Image image,
                            String key)
Creates a new PDFImage from an Image instance.
Parameters:
image - the image
key - XObject key

Method Details

getHeight

public int getHeight()
Specified by:
getHeight in interface PDFImage

getICCStream

public PDFICCStream getICCStream()
Specified by:
getICCStream in interface PDFImage

getImageColorSpace

protected ColorSpace getImageColorSpace()
Returns the image's color space.
Returns:
the color space

getKey

public String getKey()
Specified by:
getKey in interface PDFImage

getMask

public String getMask()
Specified by:
getMask in interface PDFImage

getSoftMask

public String getSoftMask()

getSoftMaskReference

public PDFReference getSoftMaskReference()
Specified by:
getSoftMaskReference in interface PDFImage

getTransparentColor

public PDFColor getTransparentColor()
Specified by:
getTransparentColor in interface PDFImage

getWidth

public int getWidth()
Specified by:
getWidth in interface PDFImage

isInverted

public boolean isInverted()
Specified by:
isInverted in interface PDFImage

isPS

public boolean isPS()
Specified by:
isPS in interface PDFImage

isTransparent

public boolean isTransparent()
Specified by:
isTransparent in interface PDFImage

populateXObjectDictionary

public void populateXObjectDictionary(PDFDictionary dict)
Specified by:
populateXObjectDictionary in interface PDFImage

setup

public void setup(PDFDocument doc)
Specified by:
setup in interface PDFImage

toPDFColorSpace

public static PDFDeviceColorSpace toPDFColorSpace(ColorSpace cs)
Converts a ColorSpace object to a PDFColorSpace object.
Parameters:
cs - ColorSpace instance
Returns:
PDFColorSpace new converted object

Copyright 1999-2008 The Apache Software Foundation. All Rights Reserved.