/* */ package quicktime.std.image;
/* */
/* */ import quicktime.QTObject;
/* */ import quicktime.QTSession;
/* */ import quicktime.qd.QDPoint;
/* */ import quicktime.std.StdQTException;
/* */ import quicktime.util.QTByteObject;
/* */ import quicktime.util.QTUtils;
/* */
/* */ public final class GXPaths extends QTByteObject
/* */ {
/* 30 */ private static boolean apriori = QTSession.apriori();
/* */ private Curve comp;
/* */
/* */ private static int howManyBytes(GXPath[] paramArrayOfGXPath)
/* */ {
/* 38 */ int i = 0;
/* 39 */ for (int j = 0; j < paramArrayOfGXPath.length; j++)
/* 40 */ i += paramArrayOfGXPath[j].getSize();
/* 41 */ return i;
/* */ }
/* */
/* */ public GXPaths(Curve paramCurve, GXPath[] paramArrayOfGXPath)
/* */ {
/* 53 */ super(howManyBytes(paramArrayOfGXPath) + 4);
/* 54 */ setIntAt(0, paramArrayOfGXPath.length);
/* 55 */ int i = 4;
/* 56 */ for (int j = 0; j < paramArrayOfGXPath.length; j++) {
/* 57 */ setBytesAt(i, paramArrayOfGXPath[j].getSize(), paramArrayOfGXPath[j].getBytes(), 0);
/* 58 */ i += paramArrayOfGXPath[j].getSize();
/* */ }
/* 60 */ this.comp = paramCurve;
/* */ }
/* */
/* */ public int getContours()
/* */ {
/* 72 */ return getIntAt(0);
/* */ }
/* */
/* */ public int countPointsInPath(int paramInt)
/* */ throws StdQTException
/* */ {
/* 83 */ int[] arrayOfInt = { 0 };
/* 84 */ int i = CurveCountPointsInPath(QTObject.ID(this.comp), getBytes(), paramInt, arrayOfInt);
/* 85 */ StdQTException.checkError(i);
/* 86 */ return arrayOfInt[0];
/* */ }
/* */
/* */ public void setPathPoint(int paramInt1, int paramInt2, QDPoint paramQDPoint, boolean paramBoolean)
/* */ throws StdQTException
/* */ {
/* 97 */ int i = CurveSetPathPoint(QTObject.ID(this.comp), getBytes(), paramInt1, paramInt2, paramQDPoint.getGXPoint(), (byte)(paramBoolean ? 1 : 0));
/* 98 */ StdQTException.checkError(i);
/* */ }
/* */
/* */ public PathPointInfo getPathPoint(int paramInt1, int paramInt2)
/* */ throws StdQTException
/* */ {
/* 109 */ QDPoint localQDPoint = new QDPoint(0.0F, 0.0F);
/* 110 */ byte[] arrayOfByte = new byte[1];
/* 111 */ int i = CurveGetPathPoint(QTObject.ID(this.comp), getBytes(), paramInt1, paramInt2, localQDPoint.getGXPoint(), arrayOfByte);
/* 112 */ StdQTException.checkError(i);
/* 113 */ return new PathPointInfo(localQDPoint, arrayOfByte[0] != 0);
/* */ }
/* */
/* */ public QDPoint[] lengthToPoint(int paramInt1, int paramInt2)
/* */ throws StdQTException
/* */ {
/* 124 */ QDPoint localQDPoint1 = new QDPoint(0.0F, 0.0F);
/* 125 */ QDPoint localQDPoint2 = new QDPoint(0.0F, 0.0F);
/* */
/* 127 */ int i = CurveLengthToPoint(QTObject.ID(this.comp), getBytes(), paramInt1, paramInt2, localQDPoint1.getGXPoint(), localQDPoint2.getGXPoint());
/* 128 */ StdQTException.checkError(i);
/* 129 */ QDPoint[] arrayOfQDPoint = new QDPoint[2];
/* 130 */ arrayOfQDPoint[0] = localQDPoint1;
/* 131 */ arrayOfQDPoint[1] = localQDPoint2;
/* 132 */ return arrayOfQDPoint;
/* */ }
/* */
/* */ public long getLength(int paramInt)
/* */ throws StdQTException
/* */ {
/* 144 */ long[] arrayOfLong = { 0L };
/* 145 */ int i = CurveGetLength(QTObject.ID(this.comp), getBytes(), paramInt, arrayOfLong);
/* 146 */ StdQTException.checkError(i);
/* 147 */ return arrayOfLong[0];
/* */ }
/* */
/* */ public float getPathPointToLength(int paramInt1, int paramInt2, QDPoint paramQDPoint)
/* */ throws StdQTException
/* */ {
/* 160 */ int[] arrayOfInt = { 0 };
/* 161 */ int i = CurvePathPointToLength(QTObject.ID(this.comp), getBytes(), paramInt1, paramInt2, paramQDPoint.getGXPoint(), arrayOfInt);
/* 162 */ StdQTException.checkError(i);
/* 163 */ return QTUtils.Fix2X(arrayOfInt[0]);
/* */ }
/* */
/* */ public NearestPointInfo getNearestPathPoint(QDPoint paramQDPoint)
/* */ throws StdQTException
/* */ {
/* 175 */ int[] arrayOfInt1 = { 0 };
/* 176 */ int[] arrayOfInt2 = { 0 };
/* 177 */ int[] arrayOfInt3 = { 0 };
/* */
/* 179 */ int i = CurveGetNearestPathPoint(QTObject.ID(this.comp), getBytes(), paramQDPoint.getGXPoint(), arrayOfInt1, arrayOfInt2, arrayOfInt3);
/* 180 */ StdQTException.checkError(i);
/* 181 */ return new NearestPointInfo(arrayOfInt1[0], arrayOfInt2[0], QTUtils.Fix2X(arrayOfInt3[0]));
/* */ }
/* */
/* */ private static native int CurveCountPointsInPath(int paramInt1, byte[] paramArrayOfByte, int paramInt2, int[] paramArrayOfInt);
/* */
/* */ private static native int CurveSetPathPoint(int paramInt1, byte[] paramArrayOfByte1, int paramInt2, int paramInt3, byte[] paramArrayOfByte2, byte paramByte);
/* */
/* */ private static native int CurveGetLength(int paramInt1, byte[] paramArrayOfByte, int paramInt2, long[] paramArrayOfLong);
/* */
/* */ private static native int CurveGetPathPoint(int paramInt1, byte[] paramArrayOfByte1, int paramInt2, int paramInt3, byte[] paramArrayOfByte2, byte[] paramArrayOfByte3);
/* */
/* */ private static native int CurveLengthToPoint(int paramInt1, byte[] paramArrayOfByte1, int paramInt2, int paramInt3, byte[] paramArrayOfByte2, byte[] paramArrayOfByte3);
/* */
/* */ private static native int CurveGetNearestPathPoint(int paramInt, byte[] paramArrayOfByte1, byte[] paramArrayOfByte2, int[] paramArrayOfInt1, int[] paramArrayOfInt2, int[] paramArrayOfInt3);
/* */
/* */ private static native int CurvePathPointToLength(int paramInt1, byte[] paramArrayOfByte1, int paramInt2, int paramInt3, byte[] paramArrayOfByte2, int[] paramArrayOfInt);
/* */ }
/* Location: Z:\System\Library\Java\Extensions\QTJava.zip
* Qualified Name: quicktime.std.image.GXPaths
* JD-Core Version: 0.6.2
*/