|
||||||||||
| PREV CLASS Documentation homepage NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectilog.views.maps.graphic.IlvClippedPathDecoration
ilog.views.maps.graphic.IlvStrokedPathDecoration
public class IlvStrokedPathDecoration
A path decoration that uses a BasicStroke as base stroke.
The stroke is defined using the same parameters as
java.awt.BasicStroke. This stroke can be either filled,
stroked, or both.
A zoomable IlvStrokedPathDecoration behaves like a
java.awt.BasicStroke that is clipped to the visible part
of the shape it strokes.
A non-zoomable IlvStrokedPathDecoration has its width
and dash always at a specified pixel size.
IlvClippedPathDecoration,
IlvPathDecoration| Constructor Summary | |
|---|---|
IlvStrokedPathDecoration(float width,
float flatness,
boolean zoomable)
Constructs a new IlvStrokedPathDecoration with the
specified flattening factor, the default BasicStroke.CAP_SQUARE cap style,
the default BasicStroke.JOIN_MITER join style, the default
miter limit of 10.0 and no dash. |
|
IlvStrokedPathDecoration(float width,
int cap,
int join,
float miterlimit,
float[] dash,
float dash_offset,
float flatness,
boolean zoomable)
Constructs a new IlvStrokedPathDecoration with the
specified flattening factor. |
|
IlvStrokedPathDecoration(IlvInputStream stream)
Reads an IlvStrokedPathDecoration from the specified input stream. |
|
| Method Summary | |
|---|---|
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,
float phase,
IlvTransformer t)
Draws the decoration for the specified shape in the specified graphics. |
float |
equivalentWidth(IlvTransformer t)
Returns an equivalent line width to this path decoration, if it is drawn using the specified transformer. |
int |
getCap()
Returns the line cap of this stroke. |
float[] |
getDash()
Returns the dash of this stroke, or null if this stroke is not
dashed. |
float |
getDashOffset()
Returns the dash offset of dashes used by this stroke. |
int |
getJoin()
Returns the line join of this stroke. |
float |
getMiterLimit()
Returns the miter limit of this stroke, if join style is BasicStroke.JOIN_MITER. |
float |
getWidth()
Returns the width of this stroke. |
boolean |
isZoomable()
Returns true if this path decoration is zoomable. |
void |
write(IlvOutputStream stream)
Writes this stroked path decoration to the specified stream. |
| Methods inherited from class ilog.views.maps.graphic.IlvClippedPathDecoration |
|---|
draw, getFlatness |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public IlvStrokedPathDecoration(float width,
float flatness,
boolean zoomable)
IlvStrokedPathDecoration with the
specified flattening factor, the default BasicStroke.CAP_SQUARE cap style,
the default BasicStroke.JOIN_MITER join style, the default
miter limit of 10.0 and no dash.
width - The width of this stroke.flatness - The flatness used when drawing the stroke.zoomable - If true, this stroke is zoomable.
public IlvStrokedPathDecoration(float width,
int cap,
int join,
float miterlimit,
float[] dash,
float dash_offset,
float flatness,
boolean zoomable)
IlvStrokedPathDecoration with the
specified flattening factor.
width - The width of this stroke.cap - The decoration of the ends of this stroke.
Valid values are java.awt.BasicStroke.CAP_BUTT,
java.awt.BasicStroke.CAP_ROUND and
java.awt.BasicStroke.CAP_SQUARE.join - The decoration applied where path segments meet.
Valid values are java.awt.BasicStroke.JOIN_BEVEL ,
java.awt.BasicStroke.JOIN_MITER and
java.awt.BasicStroke.JOIN_ROUND.miterlimit - The limit to trim the miter join.dash - The array representing the dashing pattern.dash_offset - The offset to start the dashing pattern.flatness - The flatness used when drawing the stroke.zoomable - If true, this stroke is zoomable.
public IlvStrokedPathDecoration(IlvInputStream stream)
throws IlvReadFileException
IlvStrokedPathDecoration from the specified input stream.
stream - The IlvInputStream to read from.
IlvReadFileException - If an error occurs while reading
a stroked path from the specified stream.| Method Detail |
|---|
public void write(IlvOutputStream stream)
throws IOException
write in interface IlvPersistentObjectwrite in class IlvClippedPathDecorationstream - The IlvInputStream to write to.
IOException - If an error occurs while writing this path
decoration to the stream.
public void draw(Graphics2D graphics,
Shape subshape,
float 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 float 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 float getWidth()
public int getCap()
public int getJoin()
public float getMiterLimit()
BasicStroke.JOIN_MITER.
public float[] getDash()
null if this stroke is not
dashed.
public float getDashOffset()
|
||||||||||
| PREV CLASS Documentation homepage NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||