public class IlvShapedPathDecoration extends IlvClippedPathDecoration implements IlvPersistentObject
Shape repeated at specified
intervals.
IlvShapedPathDecoration has its decoration
and decoration repetition interval zooming depending on the zoom level
of the view.
IlvShapedPathDecoration displays its
decoration at a fixed size.IlvClippedPathDecoration,
IlvDecoratedPath,
Serialized Form| Constructor and Description |
|---|
IlvShapedPathDecoration(IlvInputStream stream)
Reads an
IlvShapedPathDecoration from the specified stream. |
IlvShapedPathDecoration(Shape decoration,
double interval,
boolean zoomable)
Constructs a new
IlvShapedPathDecoration, with the
specified paint, no stroke, and a default phase and flatness of 0. |
IlvShapedPathDecoration(Shape decoration,
double interval,
double phase,
double flatness,
boolean zoomable)
Constructs a new
IlvShapedPathDecoration with the
specified flattening factor. |
| 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 subshape,
double phase,
IlvTransformer t)
Draws the decoration for the specified shape, which is a sub shape
of the original shape.
|
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 to this path decoration,
if it is drawn using the specified transformer.
|
Shape |
getDecoration()
Returns the shape used as decoration of this path decoration.
|
double |
getInterval()
Returns the interval of the decoration repetition.
|
double |
getPhase()
Returns the phase before drawing the first decoration.
|
boolean |
isZoomable()
Returns
true if this path decoration is zoomable. |
void |
write(IlvOutputStream stream)
Writes this
IlvShapedPathDecoration to the specified stream. |
getFlatnesspublic IlvShapedPathDecoration(Shape decoration, double interval, boolean zoomable)
IlvShapedPathDecoration, with the
specified paint, no stroke, and a default phase and flatness of 0.decoration - The decoration to repeat.interval - The interval at which the decoration is repeated.zoomable - If true, the decoration is zoomable.public IlvShapedPathDecoration(Shape decoration, double interval, double phase, double flatness, boolean zoomable)
IlvShapedPathDecoration with the
specified flattening factor.decoration - The decoration to repeat.interval - The interval at which the decoration is repeated.phase - The phase for decoration drawing (like dash phase).flatness - The flatness used to iterate on the decorated path.zoomable - If true, the decoration is zoomable.public IlvShapedPathDecoration(IlvInputStream stream) throws IlvReadFileException
IlvShapedPathDecoration from the specified stream.IlvReadFileExceptionpublic void write(IlvOutputStream stream) throws IOException
IlvShapedPathDecoration to the specified stream.write in interface IlvPersistentObjectwrite in class IlvClippedPathDecorationstream - The output stream.IOException - If an error occurs when writing.public Shape getDecoration()
public double getInterval()
public double getPhase()
public void draw(Graphics2D graphics, Shape subshape, double phase, IlvTransformer t)
draw in class IlvClippedPathDecorationgraphics - The Graphics2D to draw in.subshape - The Shape to draw.phase - The phase to draw this decoration.t - The viewing transformer.public double equivalentWidth(IlvTransformer t)
equivalentWidth in interface IlvPathDecorationt - The transformer to compute the equivalent width.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 IlvPathDecorationboundingBox in class IlvClippedPathDecorationshape - The shape which 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 void draw(Graphics2D graphics, Shape shape, IlvTransformer t)
draw in interface IlvPathDecorationdraw in class IlvClippedPathDecorationgraphics - The Graphics2D to draw in.shape - The Shape to draw.t - The viewing transformer.IlvClippedPathDecoration.draw(java.awt.Graphics2D, java.awt.Shape, ilog.views.IlvTransformer)© Copyright 2024 Rogue Wave Software, Inc., a Perforce company.. All Rights Reserved.