public class Content extends AbstractTransformableContent implements TransformableContent
Constructor and Description |
---|
Content()
Default Constructor.
|
Content(java.awt.Shape shape,
java.awt.Color color,
java.awt.Paint paint,
java.awt.Stroke stroke)
Explicit Value Constructor.
|
Modifier and Type | Method and Description |
---|---|
java.awt.geom.Rectangle2D |
getBounds2D(boolean transformed)
Returns a high precision bounding box of the Content
either before or after it is transformed.
|
java.awt.Color |
getColor()
Get the stroke Color.
|
java.awt.Paint |
getPaint()
Get the fill Paint.
|
java.awt.geom.PathIterator |
getPathIterator(boolean transformed)
Get a PathIterator.
|
java.awt.Stroke |
getStroke()
Get the Stroke.
|
void |
render(java.awt.Graphics g)
Render this described visual content.
|
void |
setColor(java.awt.Color color)
Set the Color to use for stroking.
|
void |
setPaint(java.awt.Paint paint)
Set the Paint to use for filling.
|
void |
setShape(java.awt.Shape shape)
Set the Shape.
|
void |
setStroke(java.awt.Stroke stroke)
Set the Stroke to use.
|
getBounds2D, setLocation, setRotation, setScale, setScale
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
setLocation, setRotation, setScale
public Content()
public Content(java.awt.Shape shape, java.awt.Color color, java.awt.Paint paint, java.awt.Stroke stroke)
shape
- The Shapecolor
- The Color to stroke with (or null for no stroke)paint
- The Paint to fill with (or null for no fill)stroke
- The Stroke (or null for the default)public java.awt.geom.Rectangle2D getBounds2D(boolean transformed)
getBounds2D
in interface TransformableContent
getBounds2D
in class AbstractTransformableContent
transformed
- true to get the BB of the transformed contentpublic java.awt.Color getColor()
public java.awt.Paint getPaint()
public java.awt.geom.PathIterator getPathIterator(boolean transformed)
transformed
- true to get the transformed versionpublic java.awt.Stroke getStroke()
public void render(java.awt.Graphics g)
render
in interface SimpleContent
g
- The rendering engine to usepublic void setColor(java.awt.Color color)
color
- The Color to use (or null to prevent stroking)public void setPaint(java.awt.Paint paint)
paint
- The Paint to use (or null to prevent filling)public void setShape(java.awt.Shape shape)
shape
- The Shape (or null to render nothing)public void setStroke(java.awt.Stroke stroke)
stroke
- The Stroke to use (or null to use the default)