FileDocCategorySizeDatePackage
RenderContext.javaAPI DocAndroid 1.5 API5997Wed May 06 22:41:54 BST 2009java.awt.image.renderable

RenderContext

public class RenderContext extends Object implements Cloneable
The Class RenderContext stores data on how an image is to be rendered: the affine transform, the area of interest, and the rendering hints.
since
Android 1.0

Fields Summary
AffineTransform
transform
The affine transform.
Shape
aoi
The area of interest.
RenderingHints
hints
The rendering hints.
Constructors Summary
public RenderContext(AffineTransform usr2dev, Shape aoi, RenderingHints hints)
Instantiates a new render context.

param
usr2dev the affine transform.
param
aoi the area of interest.
param
hints the rendering hints.

        this.transform = (AffineTransform)usr2dev.clone();
        this.aoi = aoi;
        this.hints = hints;
    
public RenderContext(AffineTransform usr2dev, Shape aoi)
Instantiates a new render context with no specified hints.

param
usr2dev the affine transform.
param
aoi the area of interest.

        this(usr2dev, aoi, null);
    
public RenderContext(AffineTransform usr2dev, RenderingHints hints)
Instantiates a new render context with no specified area of interest.

param
usr2dev the affine transform.
param
hints the rendering hints.

        this(usr2dev, null, hints);
    
public RenderContext(AffineTransform usr2dev)
Instantiates a new render context with no rendering hints or area of interest.

param
usr2dev the affine transform.

        this(usr2dev, null, null);
    
Methods Summary
public java.lang.Objectclone()

        return new RenderContext(transform, aoi, hints);
    
public voidconcatenateTransform(java.awt.geom.AffineTransform modTransform)
Concatenate the specified transform with the current transform.

param
modTransform the new transform which modifies the current transform.

        transform.concatenate(modTransform);
    
public voidconcetenateTransform(java.awt.geom.AffineTransform modTransform)
Concatenate the specified transform with the current transform.

param
modTransform the new transform which modifies the current transform.
deprecated
use {@link RenderContext#concatenateTransform(AffineTransform)}.

        concatenateTransform(modTransform);
    
public java.awt.ShapegetAreaOfInterest()
Gets the area of interest.

return
the area of interest.

        return aoi;
    
public java.awt.RenderingHintsgetRenderingHints()
Gets the rendering hints.

return
the rendering hints.

        return hints;
    
public java.awt.geom.AffineTransformgetTransform()
Gets the transform.

return
the transform.

        return (AffineTransform)transform.clone();
    
public voidpreConcatenateTransform(java.awt.geom.AffineTransform modTransform)
Concatenates the current transform with the specified transform (so they are applied with the specified transform acting first) and sets the resulting transform as the affine transform of this rendering context.

param
modTransform the new transform which modifies the current transform.

        transform.preConcatenate(modTransform);
    
public voidpreConcetenateTransform(java.awt.geom.AffineTransform modTransform)
Concatenates the current transform with the specified transform (so they are applied with the specified transform acting first) and sets the resulting transform as the affine transform of this rendering context.

param
modTransform the new transform which modifies the current transform.
deprecated
use {@link RenderContext#preConcatenateTransform(AffineTransform)} .

        preConcatenateTransform(modTransform);
    
public voidsetAreaOfInterest(java.awt.Shape newAoi)
Sets the area of interest.

param
newAoi the new area of interest.

        aoi = newAoi;
    
public voidsetRenderingHints(java.awt.RenderingHints hints)
Sets the rendering hints.

param
hints the new rendering hints.

        this.hints = hints;
    
public voidsetTransform(java.awt.geom.AffineTransform newTransform)
Sets the affine transform for this render context.

param
newTransform the new affine transform.

        transform = (AffineTransform)newTransform.clone();