org.apache.fop.image

Class FopImageConsumer

Implemented Interfaces:
ImageConsumer

public class FopImageConsumer
extends java.lang.Object
implements ImageConsumer

ImageConsumer implementation for FopImage classes.
Author:
Eric SCHAEFFER

Field Summary

protected ColorModel
cm
Color model
protected int
height
Image height in pixels
protected int
hints
hints
protected Integer
imageStatus
Image status
protected ImageProducer
ip
Image producer
protected Hashtable
properties
Image properties
protected int
width
Image width in pixels

Constructor Summary

FopImageConsumer(ImageProducer iprod)
Main constructor

Method Summary

ColorModel
getColorModel()
Returns the color model of the image
int
getHeight()
Returns the image height
int[]
getImage()
Returns the bitmap as an array.
int
getWidth()
Returns the image width
void
imageComplete(int status)
boolean
isImageReady()
Indicates whether the image is ready.
void
setColorModel(ColorModel model)
void
setDimensions(int width, int height)
void
setHints(int hintflags)
void
setPixels(int x, int y, int w, int h, ColorModel model, byte[] pixels, int off, int scansize)
void
setPixels(int x, int y, int w, int h, ColorModel model, int[] pixels, int off, int scansize)
void
setProperties(Hashtable props)

Field Details

cm

protected ColorModel cm
Color model

height

protected int height
Image height in pixels

hints

protected int hints
hints

imageStatus

protected Integer imageStatus
Image status

ip

protected ImageProducer ip
Image producer

properties

protected Hashtable properties
Image properties

width

protected int width
Image width in pixels

Constructor Details

FopImageConsumer

public FopImageConsumer(ImageProducer iprod)
Main constructor
Parameters:
iprod - ImageProducer to use

Method Details

getColorModel

public ColorModel getColorModel()
Returns the color model of the image
Returns:
the color model

getHeight

public int getHeight()
Returns the image height
Returns:
the height in pixels

getImage

public int[] getImage()
            throws Exception
Returns the bitmap as an array.
Returns:
the bitmap as an array.

getWidth

public int getWidth()
Returns the image width
Returns:
the width in pixels

imageComplete

public void imageComplete(int status)
See Also:
java.awt.image.ImageConsumer.imageComplete(int)

isImageReady

public boolean isImageReady()
            throws Exception
Indicates whether the image is ready.
Returns:
boolean True if the image is ready, false if it's still loading

setColorModel

public void setColorModel(ColorModel model)
See Also:
java.awt.image.ImageConsumer.setColorModel(ColorModel)

setDimensions

public void setDimensions(int width,
                          int height)
See Also:
java.awt.image.ImageConsumer.setDimensions(int, int)

setHints

public void setHints(int hintflags)
See Also:
java.awt.image.ImageConsumer.setHints(int)

setPixels

public void setPixels(int x,
                      int y,
                      int w,
                      int h,
                      ColorModel model,
                      byte[] pixels,
                      int off,
                      int scansize)
See Also:
java.awt.image.ImageConsumer.setPixels(int, int, int, int, ColorModel, byte[], int, int)

setPixels

public void setPixels(int x,
                      int y,
                      int w,
                      int h,
                      ColorModel model,
                      int[] pixels,
                      int off,
                      int scansize)
See Also:
java.awt.image.ImageConsumer.setPixels(int, int, int, int, ColorModel, int[], int, int)

setProperties

public void setProperties(Hashtable props)
See Also:
java.awt.image.ImageConsumer.setProperties(Hashtable)

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