org.jdrawing.graphics
Class DrawRenderedImage

java.lang.Object
  extended byorg.jdrawing.graphics.GraphicsOperation
      extended byorg.jdrawing.graphics.DrawRenderedImage
All Implemented Interfaces:
DrawingElement

public class DrawRenderedImage
extends GraphicsOperation

Graphics element which corresponds to Graphics2D.drawRenderedImage(java.awt.image.RenderedImage, java.awt.geom.AffineTransform).


Constructor Summary
DrawRenderedImage(java.awt.image.RenderedImage renderedImage)
          Returns DrawRenderedImage with given image.
DrawRenderedImage(java.awt.image.RenderedImage renderedImage, Style style)
          Returns DrawRenderedImage with given image and style.
 
Method Summary
 java.awt.image.RenderedImage getRenderedImage()
          Gets the rendered image to be drawn.
 java.awt.Shape getShapeOfOperation()
          Returns shape of the area updated by this operation.
 void paintOperation(java.awt.Graphics2D graphics)
          Performs drawing operation.
 void setRenderedImage(java.awt.image.RenderedImage renderedImage)
          Sets the rendered image to be drawn.
 
Methods inherited from class org.jdrawing.graphics.GraphicsOperation
contains, getBounds, getBounds2D, getPosition, getStyle, intersects, paint, setPosition, setStyle
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DrawRenderedImage

public DrawRenderedImage(java.awt.image.RenderedImage renderedImage)
Returns DrawRenderedImage with given image.

Parameters:
renderedImage - the specified image to be drawn

DrawRenderedImage

public DrawRenderedImage(java.awt.image.RenderedImage renderedImage,
                         Style style)
Returns DrawRenderedImage with given image and style.

Parameters:
renderedImage - the specified image to be drawn
style - Style to be used
Method Detail

setRenderedImage

public void setRenderedImage(java.awt.image.RenderedImage renderedImage)
Sets the rendered image to be drawn.

Parameters:
renderedImage - the specified image to be drawn

getRenderedImage

public java.awt.image.RenderedImage getRenderedImage()
Gets the rendered image to be drawn.

Returns:
rendered image to be drawn

paintOperation

public void paintOperation(java.awt.Graphics2D graphics)
Performs drawing operation. This implementation invokes graphics.drawRenderedImage ().

Specified by:
paintOperation in class GraphicsOperation
Parameters:
graphics - graphics context to use for painting

getShapeOfOperation

public java.awt.Shape getShapeOfOperation()
Returns shape of the area updated by this operation.

Specified by:
getShapeOfOperation in class GraphicsOperation
Returns:
the shape of updated area