Package quicktime.std.image

Source Code of quicktime.std.image.VectorStream

/*     */ package quicktime.std.image;
/*     */
/*     */ import quicktime.QTException;
/*     */ import quicktime.QTObject;
/*     */ import quicktime.qd.QDColor;
/*     */ import quicktime.qd.QDPoint;
/*     */ import quicktime.std.StdQTException;
/*     */ import quicktime.std.movies.AtomContainer;
/*     */ import quicktime.std.movies.AtomData;
/*     */ import quicktime.util.EndianDescriptor;
/*     */ import quicktime.util.EndianOrder;
/*     */ import quicktime.util.QTHandle;
/*     */
/*     */ public class VectorStream extends AtomContainer
/*     */ {
/*     */   private Curve c;
/*     */
/*     */   private static int allocate(Curve paramCurve)
/*     */     throws QTException
/*     */   {
/*  23 */     int[] arrayOfInt = { 0 };
/*  24 */     int i = CurveCreateVectorStream(QTObject.ID(paramCurve), arrayOfInt);
/*  25 */     StdQTException.checkError(i);
/*  26 */     return arrayOfInt[0];
/*     */   }
/*     */
/*     */   public VectorStream(Curve paramCurve)
/*     */     throws QTException
/*     */   {
/*  35 */     super(allocate(paramCurve), null, false);
/*  36 */     this.c = paramCurve;
/*     */   }
/*     */
/*     */   public void addPathAtom(QTHandle paramQTHandle)
/*     */     throws QTException
/*     */   {
/*  49 */     int i = CurveAddPathAtomToVectorStream(QTObject.ID(this.c), QTObject.ID(paramQTHandle), _ID());
/*  50 */     StdQTException.checkError(i);
/*     */   }
/*     */
/*     */   public void addZeroAtom()
/*     */     throws StdQTException
/*     */   {
/*  58 */     int i = CurveAddZeroAtomToVectorStream(QTObject.ID(this.c), _ID());
/*  59 */     StdQTException.checkError(i);
/*     */   }
/*     */
/*     */   public void addAtom(int paramInt, byte[] paramArrayOfByte)
/*     */     throws StdQTException
/*     */   {
/*  70 */     int i = CurveAddAtomToVectorStream(QTObject.ID(this.c), paramInt, paramArrayOfByte.length, paramArrayOfByte, _ID());
/*  71 */     StdQTException.checkError(i);
/*     */   }
/*     */
/*     */   public void addAtom(QDColor paramQDColor)
/*     */     throws QTException
/*     */   {
/*  80 */     EndianDescriptor localEndianDescriptor = QDColor.getEndianDescriptorARGBColor();
/*  81 */     EndianOrder.flipNativeToBigEndian(paramQDColor, 0, localEndianDescriptor);
/*  82 */     byte[] arrayOfByte = paramQDColor.getARGBColor();
/*     */
/*  84 */     int i = CurveAddAtomToVectorStream(QTObject.ID(this.c), 1634887522, arrayOfByte.length, arrayOfByte, _ID());
/*  85 */     StdQTException.checkError(i);
/*     */   }
/*     */
/*     */   public void addAtom(int paramInt1, int paramInt2)
/*     */     throws StdQTException
/*     */   {
/*  95 */     int[] arrayOfInt = { EndianOrder.flipNativeToBigEndian32(paramInt2) };
/*  96 */     int i = CurveAddAtomToVectorStream(QTObject.ID(this.c), paramInt1, 4, arrayOfInt, _ID());
/*  97 */     StdQTException.checkError(i);
/*     */   }
/*     */
/*     */   public void addAtom(boolean paramBoolean, QDPoint[] paramArrayOfQDPoint)
/*     */     throws StdQTException
/*     */   {
/* 108 */     int[] arrayOfInt = new int[paramArrayOfQDPoint.length * 2 + 3];
/* 109 */     arrayOfInt[0] = 1;
/* 110 */     arrayOfInt[1] = paramArrayOfQDPoint.length;
/* 111 */     arrayOfInt[2] = (paramBoolean ? 1 : 0);
/*     */
/* 113 */     for (int i = 0; i < paramArrayOfQDPoint.length; i++) {
/* 114 */       byte[] arrayOfByte = paramArrayOfQDPoint[i].getGXPoint();
/* 115 */       int j = getIntFromArray(arrayOfByte, 0);
/* 116 */       int k = getIntFromArray(arrayOfByte, 4);
/* 117 */       arrayOfInt[(3 + 2 * i)] = j;
/* 118 */       arrayOfInt[(4 + 2 * i)] = k;
/*     */     }
/*     */
/* 121 */     for (i = 0; i < arrayOfInt.length; i++) {
/* 122 */       arrayOfInt[i] = EndianOrder.flipNativeToBigEndian32(arrayOfInt[i]);
/*     */     }
/* 124 */     i = CurveAddAtomToVectorStream(QTObject.ID(this.c), 1885434984, arrayOfInt.length * 4, arrayOfInt, _ID());
/* 125 */     StdQTException.checkError(i);
/*     */   }
/*     */
/*     */   public void addAtom(QDColor[] paramArrayOfQDColor)
/*     */     throws QTException
/*     */   {
/* 134 */     byte[] arrayOfByte1 = new byte[paramArrayOfQDColor.length * 12];
/*     */
/* 137 */     for (int i = 0; i < paramArrayOfQDColor.length; i++) {
/* 138 */       QDColor localQDColor = paramArrayOfQDColor[i];
/* 139 */       EndianDescriptor localEndianDescriptor = QDColor.getEndianDescriptorGradientColor();
/* 140 */       byte[] arrayOfByte2 = localQDColor.getGradientColor();
/*     */
/* 142 */       EndianOrder.flipNativeToBigEndian(arrayOfByte2, 0, localEndianDescriptor);
/* 143 */       System.arraycopy(arrayOfByte2, 0, arrayOfByte1, 12 * i, arrayOfByte2.length);
/*     */     }
/*     */
/* 147 */     i = CurveAddAtomToVectorStream(QTObject.ID(this.c), 1735549284, arrayOfByte1.length, arrayOfByte1, _ID());
/* 148 */     StdQTException.checkError(i);
/*     */   }
/*     */
/*     */   public void removeAtom(int paramInt)
/*     */     throws StdQTException
/*     */   {
/* 160 */     int i = CurveAddAtomToVectorStream(QTObject.ID(this.c), paramInt, 0, 0, _ID());
/* 161 */     StdQTException.checkError(i);
/*     */   }
/*     */
/*     */   public AtomData getAtomData(int paramInt)
/*     */     throws QTException
/*     */   {
/* 172 */     return AtomData.fromVectorStream(this.c, this, paramInt);
/*     */   }
/*     */
/*     */   private static native int getIntFromArray(byte[] paramArrayOfByte, int paramInt);
/*     */
/*     */   private static native void setIntInArray(byte[] paramArrayOfByte, int paramInt1, int paramInt2);
/*     */
/*     */   private static native int CurveCreateVectorStream(int paramInt, int[] paramArrayOfInt);
/*     */
/*     */   private static native int CurveAddAtomToVectorStream(int paramInt1, int paramInt2, int paramInt3, int paramInt4, int paramInt5);
/*     */
/*     */   private static native int CurveAddAtomToVectorStream(int paramInt1, int paramInt2, int paramInt3, int[] paramArrayOfInt, int paramInt4);
/*     */
/*     */   private static native int CurveAddAtomToVectorStream(int paramInt1, int paramInt2, int paramInt3, byte[] paramArrayOfByte, int paramInt4);
/*     */
/*     */   private static native int CurveAddPathAtomToVectorStream(int paramInt1, int paramInt2, int paramInt3);
/*     */
/*     */   private static native int CurveAddZeroAtomToVectorStream(int paramInt1, int paramInt2);
/*     */ }

/* Location:           Z:\System\Library\Java\Extensions\QTJava.zip
* Qualified Name:     quicktime.std.image.VectorStream
* JD-Core Version:    0.6.2
*/
TOP

Related Classes of quicktime.std.image.VectorStream

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.