ibm_ilog.diagram.util.ClippingUtil
Object » ibm_ilog.diagram.util.ClippingUtil
dojo.require("ibm_ilog.diagram.util.ClippingUtil");
Method Summary
- GetLineIntersection(p1LA, p2LA, p1LB, p2LB, result) One point on the first line.
- GetLineIntersection1(ax1, ay1, ax2, ay2, bx1, by1, bx2, by2, result) x coordinate of the first point on the first line.
- add(v1, v2)
- arcEndPoint(rect, startAngle, deltaAngle) The bounding box of the complete ellipse.
- arcStartPoint(rect, startAngle) The bounding box of the complete ellipse.
- bestClipPointOnRay(startPoint, controlPoint, intersectionPoints, numIntersections) The starting point of the ray.
- calcCubicSolution(a, b, c, d, result) of the equation.
- calcLinearSolution(a, b, result) of the equation.
- calcQuadSolution(a, b, c, result) of the equation.
- clipToShape(node, graph, shape, bounds, unusedPoint, connectionPoint, referencePoint, completeResult)
- ellipseEndpointToCenterParameterization(p1, p2, fa, fs, rx, ry, alphaDegrees)
- ellipticAngle(rect, p, startAngle) The bounding box of the complete ellipse.
- ellipticalAngle(startPoint, endPoint, center)
- getClippedPoint(bbox, p1, p2) The rectangle (bounding box).
- lineIntersectsArc(p1, p2, rect, startAngle, deltaAngle, res) One point of the line.
- lineIntersectsCubicSpline(p1, p2, c, startIndex, res) One point of the line.
- lineIntersectsEllipse(p1, p2, rect, res) One point of the line.
- lineIntersectsPartialEllipse(p1, p2, rx, ry, startPoint, endPoint, fa, fs, alpha, res)
- lineIntersectsPolyPoints(p1, p2, points, closed, res) One point of the line.
- lineIntersectsQuadSpline(p1, p2, c, startIndex, res) One point of the line.
- lineIntersectsRect(p1, p2, rect, res) One point of the line.
- lineIntersectsSegment(p1, p2, p3, p4, res) A point on the line.
- multiplyScalar(vector, scalar)
- multiplyVectorial(matrix, vector)
- pointOnRay(p1, p2, testPoint) The start point of the ray.
- pointsEquals(p1, p2)
- retrieveArcPointFromAngle(rect, angle) The bounding box of the complete ellipse.
- toDegrees(radian)
- toRadians(degrees)
- vectorLenght(v)
- vectorsAngle(v1, v2)
Methods
One point on the first line.
Parameter | Type | Description |
---|---|---|
p1LA | Point | One point on the first line. |
p2LA | Point | Another point on the first line. |
p1LB | Point | One point on the second line. |
p2LB | Point | Another point on the second line. |
result | If | not <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. |
x coordinate of the first point on the first line.
Parameter | Type | Description |
---|---|---|
ax1 | The | x coordinate of the first point on the first line. |
ay1 | The | y coordinate of the first point on the first line. |
ax2 | The | x coordinate of the second point on the first line. |
ay2 | The | y coordinate of the second point on the first line. |
bx1 | The | x coordinate of the first point on the second line. |
by1 | The | y coordinate of the first point on the second line. |
bx2 | The | x coordinate of the second point on the second line. |
by2 | The | y coordinate of the second point on the second line. |
result | If | not <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. |
The bounding box of the complete ellipse.
Parameter | Type | Description |
---|---|---|
rect | dojox.gfx.Rectangle | The bounding box of the complete ellipse. |
startAngle | The | angle of the starting point in degrees (0 .. 360). |
deltaAngle | The | angle range of the arc from the starting point to the end point in degrees (0 .. 360). return: The end point. |
The bounding box of the complete ellipse.
Parameter | Type | Description |
---|---|---|
rect | dojox.gfx.Rectangle | The bounding box of the complete ellipse. |
startAngle | The | angle of the starting point in degrees (0 .. 360). return: The starting point. |
The starting point of the ray.
Parameter | Type | Description |
---|---|---|
startPoint | Point | The starting point of the ray. |
controlPoint | Point | Another point of the ray. |
intersectionPoints | Points | An 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. |
numIntersections | The | number of valid intersections in the array. return: The best of the intersection points. |
of the equation.
Parameter | Type | Description |
---|---|---|
a | Parameter | of the equation. |
b | Parameter | of the equation. |
c | Parameter | of the equation. |
d | Parameter | of the equation. |
result | Container | for 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. |
of the equation.
Parameter | Type | Description |
---|---|---|
a | Parameter | of the equation. |
b | Parameter | of the equation. |
result | Container | for 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. |
of the equation.
Parameter | Type | Description |
---|---|---|
a | Parameter | of the equation. |
b | Parameter | of the equation. |
c | Parameter | of the equation. |
result | Container | for 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. |
Parameter | Type | Description |
---|---|---|
node | ||
graph | ||
shape | ||
bounds | ||
unusedPoint | ||
connectionPoint | ||
referencePoint | ||
completeResult |
The bounding box of the complete ellipse.
Parameter | Type | Description |
---|---|---|
rect | dojox.gfx.Rectangle | The bounding box of the complete ellipse. |
p | Point | The point whose elliptic angle is calculated. |
startAngle | The | angle that defines the 0 point. return: The elliptic angle (relative to startAngle). The value is between 0 and 360. |
The rectangle (bounding box).
Parameter | Type | Description |
---|---|---|
bbox | Rectangle | The rectangle (bounding box). |
p1 | Point | The point (attach point) to which the unclipped line (link) is attached. |
p2 | Point | The 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. |
One point of the line.
Parameter | Type | Description |
---|---|---|
p1 | Point | One point of the line. |
p2 | Point | Another point on the line. |
rect | dojox.gfx.Rectangle | The bounding box of the complete ellipse. |
startAngle | The | angle of the starting point in degrees (0 .. 360). |
deltaAngle | The | angle range of the arc from the starting point to the end point in degrees (0 .. 360). |
res | Container | of two for the resulting intersection points. return: The number of intersections. |
One point of the line.
Parameter | Type | Description |
---|---|---|
p1 | Point | One point of the line. |
p2 | Point | Another point on the line. |
c | Array | An array of control points of the spline. |
startIndex | The | index 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. |
res | Container | of three for the resulting intersection points. return: The number of intersections. |
One point of the line.
Parameter | Type | Description |
---|---|---|
p1 | Point | One point of the line. |
p2 | Point | Another point on the line. |
rect | dojox.gfx.Rectangle | The bounding box of the ellipse. |
res | Container | of two for the resulting intersection points. return: The number of intersections. |
Parameter | Type | Description |
---|---|---|
p1 | Point | |
p2 | Point | |
rx | ||
ry | ||
startPoint | ||
endPoint | ||
fa | ||
fs | ||
alpha | ||
res |
One point of the line.
Parameter | Type | Description |
---|---|---|
p1 | Point | One point of the line. |
p2 | Point | Another point on the line. |
points | The | points of the polyline or polygon. |
closed | true | if it is a polygon, <code>false</code> if it is a polyline. |
res | Container | for the resulting intersection points. This container must must be large enough to get all intersection points. return: The number of intersections. |
One point of the line.
Parameter | Type | Description |
---|---|---|
p1 | Point | One point of the line. |
p2 | Point | Another point on the line. |
c | Array | An array of control points of the spline. |
startIndex | The | index 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. |
res | Container | of two for the resulting intersection points. return: The number of intersections. |
One point of the line.
Parameter | Type | Description |
---|---|---|
p1 | Point | One point of the line. |
p2 | Point | Another point on the line. |
rect | Rectangle | The rectangle to test. |
res | Container | of two for the resulting intersection points. return: The number of intersections. |
A point on the line.
Parameter | Type | Description |
---|---|---|
p1 | Point | A point on the line. |
p2 | Point | Another point on the line. |
p3 | Point | The first end point of the line segment. |
p4 | Point | The second end point of the line segment. |
res | Container | for the resulting intersection point. return: <code>true</code> if the line intersects the segment at a unique point. |
The start point of the ray.
Parameter | Type | Description |
---|---|---|
p1 | Point | The start point of the ray. |
p2 | Point | Another point on the ray. |
testPoint | Point | The point to be tested. |
The bounding box of the complete ellipse.
Parameter | Type | Description |
---|---|---|
rect | dojox.gfx.Rectangle | The bounding box of the complete ellipse. |
angle | The | elliptic angle to be considered. p: Container for the resulting point. |