这个是java的quicktime for java 的详细使用文档

源代码在线查看: gxpaths.html

软件大小: 3122 K
上传用户: Rebecca_SYF
关键词: java quicktime for 文档
下载地址: 免注册下载 普通下载 VIP

相关代码

				





: Class  GXPaths












  
      Overview 
      Package 
    Class 
      Use 
      Tree 
      Deprecated 
      Index 
      Help 
  









 PREV CLASS 
 NEXT CLASS

  FRAMES   
 NO FRAMES



  SUMMARY:  INNER | FIELD | CONSTR | METHOD

DETAIL:  FIELD | CONSTR | METHOD








quicktime.std.image

Class  GXPaths

java.lang.Object
  |
  +--quicktime.util.QTByteObject
        |
        +--quicktime.std.image.GXPaths


All Implemented Interfaces: InterfaceLib, PrimitivesLib, QuickTimeLib, java.io.Serializable, SharedLibrary, com.apple.jdirect.SharedLibrary



public final class GXPathsextends QTByteObjectimplements QuickTimeLib


The GXPaths class allows you to group multiple path contours together.
 You use this class when specifying the geometry of a path shape.


See Also: Serialized Form











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




GXPaths

public 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.
Parameters:curveComponent - the curve Componentar - array of GXPath objects containing the geometries for the paths









Method Detail




getContours

public int getContours()

Returns the no. of contours in the Paths object



Returns:the total number of coutours





countPointsInPath

public int countPointsInPath(int contourIndex)
                      throws StdQTException

This method is used to count the points along either one of a path's contours
 or all of its contours.
	  QuickTime::CurveCountPointsInPath 



Parameters:contourIndex - the index of the contour to be counted.Returns:the number of points in the contour or path.





setPathPoint

public void setPathPoint(int contourIndex,
                         int pointIndex,
                         QDPoint thePoint,
                         boolean ptIsOnPath)
                  throws StdQTException

This method is best for adding a single point to a path rather than large numbers of points to a path.
	  QuickTime::CurveSetPathPoint 



Parameters: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.





getPathPoint

public PathPointInfo getPathPoint(int contourIndex,
                                  int pointIndex)
                           throws StdQTException

This method is used to get a point from a path and to find out if the point is on the curve.
	  QuickTime::CurveGetPathPoint 



Parameters:contourIndex - Specifies the index of the contour from which to get the point.pointIndex - Specifies the index of the point to get.Returns:thePoint field that is to receive the point.





lengthToPoint

public QDPoint[] lengthToPoint(int index,
                               int length)
                        throws StdQTException

This method is used to get the point at a specified distance along a curve.
	  QuickTime::CurveLengthToPoint 



Parameters: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.Returns:QDPoint[] array of two points containing the location (first element) and the tangent point (second element)





getLength

public long getLength(int index)
               throws StdQTException

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.
	  QuickTime::CurveGetLength 



Parameters: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.Returns:wideLength Contains the length.





getPathPointToLength

public float getPathPointToLength(int startDist,
                                  int endDist,
                                  QDPoint thePoint)
                           throws StdQTException

This method is used to to get the length of a path between specified starting
 and ending distances that is nearest a point.
	  QuickTime::CurvePathPointToLength 



Parameters: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.Returns:the length of the specified part of the path.





getNearestPathPoint

public NearestPointInfo getNearestPathPoint(QDPoint thePoint)
                                     throws StdQTException

This method is used to to find the closest point on a path to a specified point.
 In programs where users directly manipulate curves, you can use this function
 to determine the closest control point to a given point.
	  QuickTime::CurveGetNearestPathPoint 



Parameters:thePoint - Contains a point for which to find the closest point on the path.Returns:information about the specified point












  
      Overview 
      Package 
    Class 
      Use 
      Tree 
      Deprecated 
      Index 
      Help 
  









 PREV CLASS 
 NEXT CLASS

  FRAMES   
 NO FRAMES



  SUMMARY:  INNER | FIELD | CONSTR | METHOD

DETAIL:  FIELD | CONSTR | METHOD








			

相关资源