|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectdiva.util.java2d.AbstractPaintedGraphic
diva.util.java2d.PaintedPath
public class PaintedPath
A utility class that strokes a shape. This class is intended for use as a low-level class to simplify construction of drawn graphics. It contains a number of fields that govern how the shape is stroked, such as the line width, dashing, and paint.
Field Summary |
---|
Fields inherited from class diva.util.java2d.AbstractPaintedGraphic |
---|
shape, stroke, strokePaint |
Constructor Summary | |
---|---|
PaintedPath(java.awt.Shape s)
Create a painted path on the given Shape. |
|
PaintedPath(java.awt.Shape s,
float lineWidth)
Create a painted path on the given Shape with a given line width. |
|
PaintedPath(java.awt.Shape s,
float lineWidth,
java.awt.Paint paint)
Create a painted path on the given Shape with a given line width and stroke color. |
Method Summary | |
---|---|
float[] |
getDashArray()
Get the dash array. |
float |
getLineWidth()
Get the line width. |
boolean |
hit(java.awt.geom.Rectangle2D r)
Test if this shape is hit by the given rectangle. |
boolean |
intersects(java.awt.geom.Rectangle2D r)
Test if this shape intersects the given rectangle. |
void |
paint(java.awt.Graphics2D g)
Paint the shape. |
void |
setDashArray(float[] dashArray)
Set the dash array of the stroke. |
void |
setLineWidth(float lineWidth)
Set the line width. |
void |
setStroke(java.awt.Stroke s)
Set the stroke |
Methods inherited from class diva.util.java2d.AbstractPaintedGraphic |
---|
getBounds, getStroke, getStroke, getStroke |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public PaintedPath(java.awt.Shape s)
public PaintedPath(java.awt.Shape s, float lineWidth)
public PaintedPath(java.awt.Shape s, float lineWidth, java.awt.Paint paint)
Method Detail |
---|
public float[] getDashArray()
public float getLineWidth()
getLineWidth
in interface PaintedGraphic
getLineWidth
in class AbstractPaintedGraphic
public boolean hit(java.awt.geom.Rectangle2D r)
hit
in interface PaintedGraphic
hit
in class AbstractPaintedGraphic
public boolean intersects(java.awt.geom.Rectangle2D r)
public void paint(java.awt.Graphics2D g)
public void setDashArray(float[] dashArray)
public void setLineWidth(float lineWidth)
setLineWidth
in interface PaintedGraphic
setLineWidth
in class AbstractPaintedGraphic
public void setStroke(java.awt.Stroke s)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |