org.apache.fop.pdf
Class BitmapImage
java.lang.Object
org.apache.fop.pdf.BitmapImage
- PDFImage
public class BitmapImage
extends java.lang.Object
Bitmap image.
This is used to create a bitmap image that will be inserted
into pdf.
BitmapImage(String k, int width, int height, byte[] data, String mask) - Create a bitmap image.
|
BitmapImage
public BitmapImage(String k,
int width,
int height,
byte[] data,
String mask)
Create a bitmap image.
Creates a new bitmap image with the given data.
k
- the key to be used to lookup the imagewidth
- the width of the imageheight
- the height of the imagedata
- the bitmap datamask
- the transparancy mask reference if any
getBitsPerPixel
public int getBitsPerPixel()
Get the number of bits per pixel.
- getBitsPerPixel in interface PDFImage
- the number of bits per pixel
getHeight
public int getHeight()
Get the height of this image.
- getHeight in interface PDFImage
getKey
public String getKey()
Get the key for this image.
This key is used by the pdf document so that it will only
insert an image once. All other references to the same image
will use the same XObject reference.
- getKey in interface PDFImage
- the unique key to identify this image
getMask
public String getMask()
Get the bitmap mask reference for this image.
Current not supported.
- getMask in interface PDFImage
- the bitmap mask reference
getSoftMask
public String getSoftMask()
Get the soft mask reference for this image.
- getSoftMask in interface PDFImage
- the soft mask reference if any
getWidth
public int getWidth()
Get the width of this image.
- getWidth in interface PDFImage
isPS
public boolean isPS()
Check if this is a postscript image.
- isPS in interface PDFImage
isTransparent
public boolean isTransparent()
Check if this image has a transparent color.
- isTransparent in interface PDFImage
- true if it has a transparent color
outputContents
public void outputContents(OutputStream out)
throws IOException
- outputContents in interface PDFImage
setColorSpace
public void setColorSpace(PDFDeviceColorSpace cs)
Set the color space for this image.
setTransparent
public void setTransparent(PDFColor t)
Set the transparent color for this iamge.
t
- the transparent color
setup
public void setup(PDFDocument doc)
Setup this image with the pdf document.
- setup in interface PDFImage
doc
- the pdf document this will be inserted into
Copyright 1999-2007 The Apache Software Foundation. All Rights Reserved.