public class RenderContext extends Object implements Cloneable
Users create RenderContexts and pass them to the RenderableImage via the createRendering method. Most of the methods of RenderContexts are not meant to be used directly by applications, but by the RenderableImage and operator classes to which it is passed.
The AffineTransform parameter passed into and out of this class are cloned. The RenderingHints and Shape parameters are not necessarily cloneable and are therefore only reference copied. Altering RenderingHints or Shape instances that are in use by instances of RenderContext may have undesired side effects.
Constructor and Description |
---|
RenderContext(AffineTransform usr2dev)
Constructs a RenderContext with a given transform.
|
RenderContext(AffineTransform usr2dev,
RenderingHints hints)
Constructs a RenderContext with a given transform and rendering hints.
|
RenderContext(AffineTransform usr2dev,
Shape aoi)
Constructs a RenderContext with a given transform and area of interest.
|
RenderContext(AffineTransform usr2dev,
Shape aoi,
RenderingHints hints)
Constructs a RenderContext with a given transform.
|
Modifier and Type | Method and Description |
---|---|
Object |
clone()
Makes a copy of a RenderContext.
|
void |
concatenateTransform(AffineTransform modTransform)
Modifies the current user-to-device transform by appending another
transform.
|
void |
concetenateTransform(AffineTransform modTransform)
Deprecated.
replaced by
concatenateTransform(AffineTransform) . |
Shape |
getAreaOfInterest()
Gets the ares of interest currently contained in the
RenderContext.
|
RenderingHints |
getRenderingHints()
Gets the rendering hints of this
RenderContext . |
AffineTransform |
getTransform()
Gets the current user-to-device AffineTransform.
|
void |
preConcatenateTransform(AffineTransform modTransform)
Modifies the current user-to-device transform by prepending another
transform.
|
void |
preConcetenateTransform(AffineTransform modTransform)
Deprecated.
replaced by
preConcatenateTransform(AffineTransform) . |
void |
setAreaOfInterest(Shape newAoi)
Sets the current area of interest.
|
void |
setRenderingHints(RenderingHints hints)
Sets the rendering hints of this
RenderContext . |
void |
setTransform(AffineTransform newTransform)
Sets the current user-to-device AffineTransform contained
in the RenderContext to a given transform.
|
public RenderContext(AffineTransform usr2dev, Shape aoi, RenderingHints hints)
usr2dev
- an AffineTransform.aoi
- a Shape representing the area of interest.hints
- a RenderingHints object containing rendering hints.public RenderContext(AffineTransform usr2dev)
usr2dev
- an AffineTransform.public RenderContext(AffineTransform usr2dev, RenderingHints hints)
usr2dev
- an AffineTransform.hints
- a RenderingHints object containing rendering hints.public RenderContext(AffineTransform usr2dev, Shape aoi)
usr2dev
- an AffineTransform.aoi
- a Shape representing the area of interest.public RenderingHints getRenderingHints()
RenderContext
.RenderingHints
object that represents
the rendering hints of this RenderContext
.setRenderingHints(RenderingHints)
public void setRenderingHints(RenderingHints hints)
RenderContext
.hints
- a RenderingHints
object that represents
the rendering hints to assign to this RenderContext
.getRenderingHints()
public void setTransform(AffineTransform newTransform)
newTransform
- the new AffineTransform.getTransform()
public void preConcatenateTransform(AffineTransform modTransform)
[this] = [modTransform] x [this]
modTransform
- the AffineTransform to prepend to the
current usr2dev transform.@Deprecated public void preConcetenateTransform(AffineTransform modTransform)
preConcatenateTransform(AffineTransform)
.[this] = [modTransform] x [this]This method does the same thing as the preConcatenateTransform method. It is here for backward compatibility with previous releases which misspelled the method name.
modTransform
- the AffineTransform to prepend to the
current usr2dev transform.public void concatenateTransform(AffineTransform modTransform)
[this] = [this] x [modTransform]
modTransform
- the AffineTransform to append to the
current usr2dev transform.@Deprecated public void concetenateTransform(AffineTransform modTransform)
concatenateTransform(AffineTransform)
.[this] = [this] x [modTransform]This method does the same thing as the concatenateTransform method. It is here for backward compatibility with previous releases which misspelled the method name.
modTransform
- the AffineTransform to append to the
current usr2dev transform.public AffineTransform getTransform()
setTransform(AffineTransform)
public void setAreaOfInterest(Shape newAoi)
newAoi
- The new area of interest.getAreaOfInterest()
public Shape getAreaOfInterest()
setAreaOfInterest(Shape)
Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2012, Oracle and/or its affiliates. All rights reserved.