org.apache.batik.ext.awt.image.renderable

Class PadRable8Bit

public class PadRable8Bit extends AbstractRable implements PadRable, PaintRable

Concrete implementation of the PadRable interface. This pads the image to a specified rectangle in user coord system.
Constructor Summary
PadRable8Bit(Filter src, Rectangle2D padRect, PadMode padMode)
Method Summary
RenderedImagecreateRendering(RenderContext rc)
Rectangle2DgetBounds2D()
ShapegetDependencyRegion(int srcIndex, Rectangle2D outputRgn)
ShapegetDirtyRegion(int srcIndex, Rectangle2D inputRgn)
PadModegetPadMode()
Get the current extension mode for pad
Rectangle2DgetPadRect()
Get the current rectangle for padding
FiltergetSource()
Returns the source to be affine.
booleanpaintRable(Graphics2D g2d)
Should perform the equivilent action as createRendering followed by drawing the RenderedImage to Graphics2D, or return false.
voidsetPadMode(PadMode padMode)
Set the current extension mode for pad
voidsetPadRect(Rectangle2D rect)
Set the current rectangle for padding.
voidsetSource(Filter src)
Sets the source to be affine.

Constructor Detail

PadRable8Bit

public PadRable8Bit(Filter src, Rectangle2D padRect, PadMode padMode)

Method Detail

createRendering

public RenderedImage createRendering(RenderContext rc)

getBounds2D

public Rectangle2D getBounds2D()

getDependencyRegion

public Shape getDependencyRegion(int srcIndex, Rectangle2D outputRgn)

getDirtyRegion

public Shape getDirtyRegion(int srcIndex, Rectangle2D inputRgn)

getPadMode

public PadMode getPadMode()
Get the current extension mode for pad

Returns: Mode currently in use for pad

getPadRect

public Rectangle2D getPadRect()
Get the current rectangle for padding

Returns: Rectangle currently in use for pad.

getSource

public Filter getSource()
Returns the source to be affine.

paintRable

public boolean paintRable(Graphics2D g2d)
Should perform the equivilent action as createRendering followed by drawing the RenderedImage to Graphics2D, or return false.

Parameters: g2d The Graphics2D to draw to.

Returns: true if the paint call succeeded, false if for some reason the paint failed (in which case a createRendering should be used).

setPadMode

public void setPadMode(PadMode padMode)
Set the current extension mode for pad

Parameters: padMode the new pad mode

setPadRect

public void setPadRect(Rectangle2D rect)
Set the current rectangle for padding.

Parameters: rect the new rectangle to use for pad.

setSource

public void setSource(Filter src)
Sets the source to be affine.

Parameters: src image to affine.

Copyright B) 2008 Apache Software Foundation. All Rights Reserved.