|
Search this API | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object y.view.BezierPathCalculator
public class BezierPathCalculator
Calculates the visible path of an edge as a bezier curve.
The behavior of this path calculator is similar to the path calculated for
class BezierEdgeRealizer
.
Constructor Summary | |
---|---|
BezierPathCalculator()
Initializes a new BezierPathCalculator instance. |
|
BezierPathCalculator(boolean interpolate)
Initializes a new BezierPathCalculator instance. |
Method Summary | |
---|---|
byte |
calculatePath(EdgeRealizer context,
BendList bends,
java.awt.geom.GeneralPath path,
java.awt.geom.Point2D sourceIntersectionPointOut,
java.awt.geom.Point2D targetIntersectionPointOut)
Calculates the visible path of an edge as a bezier curve. |
boolean |
isInterpolationEnabled()
Determines whether or not additional control points are calculated from the coordinates of the edge's bends to ensure a smooth bezier path. |
void |
setInterpolationEnabled(boolean enabled)
Specifies whether or not additional control points are calculated from the coordinates of the edge's bends that ensure a smooth bezier path. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public BezierPathCalculator()
BezierPathCalculator
instance.
public BezierPathCalculator(boolean interpolate)
BezierPathCalculator
instance.
interpolate
- if true
additional control points are
calculated from the coordinates of the edge's bends to ensure a smooth
bezier path; if false
only the edge's bends are used as
control points.setInterpolationEnabled(boolean)
Method Detail |
---|
public boolean isInterpolationEnabled()
If interpolation is turned off, only the edge's bends are used as control
points for the bezier path. I.e. the edge path is a piecewise composition
of bezier curves such that bends 0,1,2,3 define the first bezier curve
(with bend 0 being the start point, bend 3 being the end point, and bends 1
and 2 being parametric control points), bends 3,4,5,6 define the second
bezier curve, etc. Consequently, the number of bends has to equal
3*n+1
for some n > -1
in this case.
true
if additional control points are calculated and
false
otherwise.setInterpolationEnabled(boolean)
public void setInterpolationEnabled(boolean enabled)
If interpolation is turned off, only the edge's bends are used as control
points for the bezier path. I.e. the edge path is a piecewise composition
of bezier curves such that bends 0,1,2,3 define the first bezier curve
(with bend 0 being the start point, bend 3 being the end point, and bends 1
and 2 being parametric control points), bends 3,4,5,6 define the second
bezier curve, etc. Consequently, the number of bends has to equal
3*n+1
for some n > -1
in this case.
enabled
- if true
additional control points are
calculated; if false
only the edge's bends are used as control
points.isInterpolationEnabled()
public byte calculatePath(EdgeRealizer context, BendList bends, java.awt.geom.GeneralPath path, java.awt.geom.Point2D sourceIntersectionPointOut, java.awt.geom.Point2D targetIntersectionPointOut)
calculatePath
in interface GenericEdgeRealizer.PathCalculator
context
- the context EdgeRealizerbends
- the current BendListpath
- the current GeneralPathsourceIntersectionPointOut
- the point to place the source intersection point intargetIntersectionPointOut
- the point to place the target intersection point in
EdgeRealizer.PATH_UNCLIPPED
,
EdgeRealizer.PATH_CLIPPED_AT_SOURCE
,
EdgeRealizer.PATH_CLIPPED_AT_TARGET
, or
EdgeRealizer.PATH_CLIPPED_AT_SOURCE_AND_TARGET
.
|
© Copyright 2000-2022, yWorks GmbH. All rights reserved. |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |