public class IlvShapeEndedPathDecoration extends Object implements IlvPathDecoration, IlvPersistentObject
Constructor and Description |
---|
IlvShapeEndedPathDecoration(IlvInputStream stream)
Reads an
IlvShapeEndedPathDecoration from the specified stream. |
IlvShapeEndedPathDecoration(Shape start,
Shape end,
double flatness,
boolean zoomable)
Constructs a new
IlvShapeEndedPathDecoration with the
specified shapes at each ends. |
Modifier and Type | Method and Description |
---|---|
IlvRect |
boundingBox(Shape shape,
IlvRect r,
IlvTransformer t)
Returns the bounding box of the specified shape, if it is decorated using
this decoration.
|
void |
draw(Graphics2D graphics,
Shape shape,
IlvTransformer t)
Draws the decoration for the specified shape in the specified
graphics.
|
double |
equivalentWidth(IlvTransformer t)
Returns an equivalent line width for the specified transformer.
|
Shape |
getEnd()
Returns the end shape for this decoration.
|
double |
getFlatness()
Returns the flatness used when drawing this decoration.
|
Shape |
getStart()
Returns the start shape for this decoration.
|
boolean |
isZoomable()
Returns
true if this path decoration is zoomable. |
void |
write(IlvOutputStream stream)
Writes this
IlvShapeEndedPathDecoration to the specified stream. |
public IlvShapeEndedPathDecoration(Shape start, Shape end, double flatness, boolean zoomable)
IlvShapeEndedPathDecoration
with the
specified shapes at each ends.start
- The Shape
used to decorate the path start.end
- The Shape
used to decorate the path end.flatness
- The flatness used to iterate on the decorated path.zoomable
- If true
, the decoration is made zoomable.public IlvShapeEndedPathDecoration(IlvInputStream stream) throws IlvReadFileException
IlvShapeEndedPathDecoration
from the specified stream.IlvReadFileException
public void write(IlvOutputStream stream) throws IOException
IlvShapeEndedPathDecoration
to the specified stream.write
in interface IlvPersistentObject
stream
- the output streamIOException
- thrown when an exception occurs during
the write operation for this object.public double getFlatness()
public Shape getStart()
public Shape getEnd()
public void draw(Graphics2D graphics, Shape shape, IlvTransformer t)
draw
in interface IlvPathDecoration
graphics
- The Graphics2D
to draw in.shape
- The Shape
to draw.t
- The viewing transformer.public IlvRect boundingBox(Shape shape, IlvRect r, IlvTransformer t)
r
is non null, the result is put in r
and returned,
otherwise the result is returned in a newly allocated IlvRect
.boundingBox
in interface IlvPathDecoration
shape
- The shape whose bounding box is to be computed.r
- The IlvRect
that will contain the result.t
- The transformer for this bounding box.public boolean isZoomable()
true
if this path decoration is zoomable.isZoomable
in interface IlvPathDecoration
public double equivalentWidth(IlvTransformer t)
equivalentWidth
in interface IlvPathDecoration
t
- The transformer to compute the equivalent width.© Copyright Rogue Wave Software, Inc. 1997, 2018. All Rights Reserved.