public class Content extends AbstractTransformableContent implements TransformableContent
| Constructor and Description |
|---|
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.
|
| Modifier and Type | Method and Description |
|---|---|
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).
|
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.
|
void |
setRotation(double angle,
double x,
double y)
Set the rotation.
|
setScale, setScaleequals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitsetScalepublic 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 edgepublic 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)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 contentpublic 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 Compositepublic void setLocation(double x,
double y)
Note: This method overrides the version in the parent because the translation of sampled content does not require a transformation.
setLocation in interface TransformableContentsetLocation in class AbstractTransformableContentx - The x positiony - The y positionpublic void setRotation(double angle,
double x,
double y)
Note: This method overrides the version in the parent because efficiency can be improved when rotations are prevented.
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 around