|
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectvisual.statik.AbstractTransformableContent
visual.statik.sampled.Content
public class Content
A BufferedImage that knows how to render itself (i.e., a BufferedImage along with all of the attributes necessary for rendering)
| Field Summary |
|---|
| Fields inherited from class visual.statik.AbstractTransformableContent |
|---|
angle, relocated, rerotated, rescaled, x, xRotation, xScale, y, yRotation, yScale |
| Constructor Summary | |
|---|---|
Content()
Default Constructor |
|
Content(java.awt.image.BufferedImage image,
double x,
double y)
Explicit Value Constructor |
|
Content(java.awt.image.BufferedImage image,
double x,
double y,
boolean rotating)
Explicit Value Constructor |
|
| Method Summary | |
|---|---|
java.awt.geom.Rectangle2D |
getBounds2D()
Returns a high precision bounding box of the appropriately transformed content |
java.awt.geom.Rectangle2D |
getBounds2D(boolean transformed)
Returns a high precision bounding box of the Content either before or after it is transformed (required by TransformedContent) |
protected boolean |
isTransformationRequired()
Does this AbstractTransformableContent object need to be transformed before being used? |
void |
render(java.awt.Graphics g)
Render this sampled visual content (required by Content) |
void |
setBufferedImageOp(java.awt.image.BufferedImageOp op)
Set the BufferedImageOp to use when transforming the Image |
void |
setComposite(java.awt.Composite c)
Set the transparency/Composite |
void |
setImage(java.awt.image.BufferedImage image)
Set the BufferedImage |
void |
setLocation(double x,
double y)
Set the location Note: This method overrides the version in the parent because the translation of sampled content does not require transformation |
void |
setRotation(double angle,
double x,
double y)
Set the rotation Note: This method overrides the version in the parent because efficiency can be improved when rotations are prevented |
protected void |
setTransformationRequired(boolean required)
Set whether this AbstractTransformableContent object needs to be transformed before being used |
| Methods inherited from class visual.statik.AbstractTransformableContent |
|---|
getAffineTransform, setScale, setScale |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface visual.statik.TransformableContent |
|---|
setScale |
| Constructor Detail |
|---|
public Content()
public Content(java.awt.image.BufferedImage image,
double x,
double y)
image - The BufferedImagex - The coordinate of the left edgey - The coordinate of the top edge
public Content(java.awt.image.BufferedImage image,
double x,
double y,
boolean rotating)
image - The BufferedImagex - The coordinate of the left edgey - The coordinate of the top edgerotating - false to prevent rotations (and improve performance)| Method Detail |
|---|
public java.awt.geom.Rectangle2D getBounds2D()
getBounds2D in class AbstractTransformableContentpublic java.awt.geom.Rectangle2D getBounds2D(boolean transformed)
getBounds2D in interface TransformableContentgetBounds2D in class AbstractTransformableContenttransformed - true to get the BB of the transformed content
public void render(java.awt.Graphics g)
render in interface SimpleContentg - The rendering engine to usepublic void setImage(java.awt.image.BufferedImage image)
image - The BufferedImage (or null to render nothing)public void setBufferedImageOp(java.awt.image.BufferedImageOp op)
op - The BufferedImageOppublic void setComposite(java.awt.Composite c)
c - The Composite
public void setLocation(double x,
double y)
setLocation in interface TransformableContentsetLocation in class AbstractTransformableContentx - The x positiony - The y position
public void setRotation(double angle,
double x,
double y)
setRotation in interface TransformableContentsetRotation in class AbstractTransformableContentangle - The rotation anglex - The x-coordinate of the point to rotate aroundy - The y-coordinate of the point to rotate aroundprotected void setTransformationRequired(boolean required)
setTransformationRequired in class AbstractTransformableContentrequired - true to indicate that a transformation is requriedprotected boolean isTransformationRequired()
isTransformationRequired in class AbstractTransformableContent
|
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||