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.IlvReadFileExceptionpublic void write(IlvOutputStream stream) throws IOException
IlvShapeEndedPathDecoration to the specified stream.write in interface IlvPersistentObjectstream - 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 IlvPathDecorationgraphics - 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 IlvPathDecorationshape - 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 IlvPathDecorationpublic double equivalentWidth(IlvTransformer t)
equivalentWidth in interface IlvPathDecorationt - The transformer to compute the equivalent width.© Copyright 2024 Rogue Wave Software, Inc., a Perforce company.. All Rights Reserved.