|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--quicktime.util.QTByteObject | +--quicktime.std.image.GXPaths
The GXPaths class allows you to group multiple path contours together. You use this class when specifying the geometry of a path shape.
Fields inherited from interface quicktime.jdirect.QuickTimeLib |
JDirect_MacOSX, libraryInstance, name |
Constructor Summary | |
GXPaths(Curve curveComponent,
GXPath[] ar)
Creates a GXPaths object which corresponds to gxPaths object of QuickDrawGX It sets the total number of contours in the path equal to the total number of paths ie every path has one contour. |
Method Summary | |
int |
countPointsInPath(int contourIndex)
This method is used to count the points along either one of a path's contours or all of its contours. |
int |
getContours()
Returns the no. |
long |
getLength(int index)
This method is used to calculate the length of one of a path's contours or the sum of the lengths of all of its contours. |
NearestPointInfo |
getNearestPathPoint(QDPoint thePoint)
This method is used to to find the closest point on a path to a specified point. |
PathPointInfo |
getPathPoint(int contourIndex,
int pointIndex)
This method is used to get a point from a path and to find out if the point is on the curve. |
float |
getPathPointToLength(int startDist,
int endDist,
QDPoint thePoint)
This method is used to to get the length of a path between specified starting and ending distances that is nearest a point. |
QDPoint[] |
lengthToPoint(int index,
int length)
This method is used to get the point at a specified distance along a curve. |
void |
setPathPoint(int contourIndex,
int pointIndex,
QDPoint thePoint,
boolean ptIsOnPath)
This method is best for adding a single point to a path rather than large numbers of points to a path. |
Methods inherited from class quicktime.util.QTByteObject |
equals, fromArray, getBytes, getSize, toString |
Methods inherited from class java.lang.Object |
getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public GXPaths(Curve curveComponent, GXPath[] ar)
curveComponent
- the curve Componentar
- array of GXPath objects containing the geometries for the pathsMethod Detail |
public int getContours()
public int countPointsInPath(int contourIndex) throws StdQTException
contourIndex
- the index of the contour to be counted.public void setPathPoint(int contourIndex, int pointIndex, QDPoint thePoint, boolean ptIsOnPath) throws StdQTException
contourIndex
- Specifies the index of the path contour to which to add the point.pointIndex
- Specifies the index of the point to add.ptIsOnPath
- If TRUE , specifies that the new point is to be on the path.public PathPointInfo getPathPoint(int contourIndex, int pointIndex) throws StdQTException
contourIndex
- Specifies the index of the contour from which to get the point.pointIndex
- Specifies the index of the point to get.public QDPoint[] lengthToPoint(int index, int length) throws StdQTException
index
- Specifies the index of the path contour from which to get the point.length
- Specifies the distance along the curve at which to find the point.public long getLength(int index) throws StdQTException
index
- Contains the index of the contour whose length is to be calculated or, if the value is 0 ,
specifies to calculate the lengths of all of the path's contours and return the sum of the lengths.public float getPathPointToLength(int startDist, int endDist, QDPoint thePoint) throws StdQTException
startDist
- Specifies the distance along the path at which to start measuring the path's length.endDist
- Specifies the distance along the path at which to stop measuring the path's length.thePoint
- Contains a pointer to a point; the function measures the path closest to this point.public NearestPointInfo getNearestPathPoint(QDPoint thePoint) throws StdQTException
thePoint
- Contains a point for which to find the closest point on the path.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |