IBM ILOG Dojo Diagrammer 1.1.1 API Documentation
Legend: Array Boolean Constructor Date DomNode Error Function Namespace Number Object RegExp Singleton String

ibm_ilog.diagram.util.ClippingUtil

Object » ibm_ilog.diagram.util.ClippingUtil
dojo.require("ibm_ilog.diagram.util.ClippingUtil");

Method Summary

Methods

GetLineIntersection
One point on the first line.
ParameterTypeDescription
p1LAPointOne point on the first line.
p2LAPointAnother point on the first line.
p1LBPointOne point on the second line.
p2LBPointAnother point on the second line.
resultIfnot <code>null</code>, this point is used a container for the return value and is filled with the intersection point if the lines intersect. If <code>null</code>, a new point is allocated internally and returned, if the lines intersect. return: The unique intersection point, or <code>null</code> if the two lines are parallel.
GetLineIntersection1
x coordinate of the first point on the first line.
ParameterTypeDescription
ax1Thex coordinate of the first point on the first line.
ay1They coordinate of the first point on the first line.
ax2Thex coordinate of the second point on the first line.
ay2They coordinate of the second point on the first line.
bx1Thex coordinate of the first point on the second line.
by1They coordinate of the first point on the second line.
bx2Thex coordinate of the second point on the second line.
by2They coordinate of the second point on the second line.
resultIfnot <code>null</code>, this point is used a container for the return value and is filled with the intersection point if the lines intersect. If <code>null</code>, a new point is allocated internally and returned, if the lines intersect. return: The unique intersection point, or <code>null</code> if the two lines are parallel.
add
ParameterTypeDescription
v1
v2
arcEndPoint
The bounding box of the complete ellipse.
ParameterTypeDescription
rectdojox.gfx.RectangleThe bounding box of the complete ellipse.
startAngleTheangle of the starting point in degrees (0 .. 360).
deltaAngleTheangle range of the arc from the starting point to the end point in degrees (0 .. 360). return: The end point.
arcStartPoint
The bounding box of the complete ellipse.
ParameterTypeDescription
rectdojox.gfx.RectangleThe bounding box of the complete ellipse.
startAngleTheangle of the starting point in degrees (0 .. 360). return: The starting point.
bestClipPointOnRay
The starting point of the ray.
ParameterTypeDescription
startPointPointThe starting point of the ray.
controlPointPointAnother point of the ray.
intersectionPointsPointsAn array of intersection points. Typically, these are the intersection points of a line through starting and control points and the border shape of a node.
numIntersectionsThenumber of valid intersections in the array. return: The best of the intersection points.
calcCubicSolution
of the equation.
ParameterTypeDescription
aParameterof the equation.
bParameterof the equation.
cParameterof the equation.
dParameterof the equation.
resultContainerfor the result. The array must have size 3. return: The number of solutions. Return -1 if the equation is redundant, that is, if every x is a solution.
calcLinearSolution
of the equation.
ParameterTypeDescription
aParameterof the equation.
bParameterof the equation.
resultContainerfor the result. The array must have size 1. return: The number of solutions. Return -1 if the equation is redundant, that is, if every x is a solution.
calcQuadSolution
of the equation.
ParameterTypeDescription
aParameterof the equation.
bParameterof the equation.
cParameterof the equation.
resultContainerfor the result. The array must have size 2. return: The number of solutions. Return -1 if the equation is redundant, that is, if every x is a solution.
clipToShape
ParameterTypeDescription
node
graph
shape
bounds
unusedPoint
connectionPoint
referencePoint
completeResult
ellipseEndpointToCenterParameterization
ParameterTypeDescription
p1
p2
fa
fs
rx
ry
alphaDegrees
ellipticAngle
The bounding box of the complete ellipse.
ParameterTypeDescription
rectdojox.gfx.RectangleThe bounding box of the complete ellipse.
pPointThe point whose elliptic angle is calculated.
startAngleTheangle that defines the 0 point. return: The elliptic angle (relative to startAngle). The value is between 0 and 360.
ellipticalAngle
ParameterTypeDescription
startPoint
endPoint
center
getClippedPoint
The rectangle (bounding box).
ParameterTypeDescription
bboxRectangleThe rectangle (bounding box).
p1PointThe point (attach point) to which the unclipped line (link) is attached.
p2PointThe auxiliary control point. For the purpose of clipping, the line (link) can be considered as a ray that starts at the attach point and goes through the control point. return: The clipped point.
lineIntersectsArc
One point of the line.
ParameterTypeDescription
p1PointOne point of the line.
p2PointAnother point on the line.
rectdojox.gfx.RectangleThe bounding box of the complete ellipse.
startAngleTheangle of the starting point in degrees (0 .. 360).
deltaAngleTheangle range of the arc from the starting point to the end point in degrees (0 .. 360).
resContainerof two for the resulting intersection points. return: The number of intersections.
lineIntersectsCubicSpline
One point of the line.
ParameterTypeDescription
p1PointOne point of the line.
p2PointAnother point on the line.
cArrayAn array of control points of the spline.
startIndexTheindex of the first valid control point in the array <code>c</code>. There must be four valid control points of the spline in the array.
resContainerof three for the resulting intersection points. return: The number of intersections.
lineIntersectsEllipse
One point of the line.
ParameterTypeDescription
p1PointOne point of the line.
p2PointAnother point on the line.
rectdojox.gfx.RectangleThe bounding box of the ellipse.
resContainerof two for the resulting intersection points. return: The number of intersections.
lineIntersectsPartialEllipse
ParameterTypeDescription
p1Point
p2Point
rx
ry
startPoint
endPoint
fa
fs
alpha
res
lineIntersectsPolyPoints
One point of the line.
ParameterTypeDescription
p1PointOne point of the line.
p2PointAnother point on the line.
pointsThepoints of the polyline or polygon.
closedtrueif it is a polygon, <code>false</code> if it is a polyline.
resContainerfor the resulting intersection points. This container must must be large enough to get all intersection points. return: The number of intersections.
lineIntersectsQuadSpline
One point of the line.
ParameterTypeDescription
p1PointOne point of the line.
p2PointAnother point on the line.
cArrayAn array of control points of the spline.
startIndexTheindex of the first valid control point in the array <code>c</code>. There must be three valid control points of the spline in the array.
resContainerof two for the resulting intersection points. return: The number of intersections.
lineIntersectsRect
One point of the line.
ParameterTypeDescription
p1PointOne point of the line.
p2PointAnother point on the line.
rectRectangleThe rectangle to test.
resContainerof two for the resulting intersection points. return: The number of intersections.
lineIntersectsSegment
A point on the line.
ParameterTypeDescription
p1PointA point on the line.
p2PointAnother point on the line.
p3PointThe first end point of the line segment.
p4PointThe second end point of the line segment.
resContainerfor the resulting intersection point. return: <code>true</code> if the line intersects the segment at a unique point.
multiplyScalar
ParameterTypeDescription
vector
scalar
multiplyVectorial
ParameterTypeDescription
matrix
vector
pointOnRay
The start point of the ray.
ParameterTypeDescription
p1PointThe start point of the ray.
p2PointAnother point on the ray.
testPointPointThe point to be tested.
pointsEquals
ParameterTypeDescription
p1
p2
retrieveArcPointFromAngle
The bounding box of the complete ellipse.
ParameterTypeDescription
rectdojox.gfx.RectangleThe bounding box of the complete ellipse.
angleTheelliptic angle to be considered. p: Container for the resulting point.
toDegrees
ParameterTypeDescription
radian
toRadians
ParameterTypeDescription
degrees
vectorLenght
ParameterTypeDescription
v
vectorsAngle
ParameterTypeDescription
v1
v2