/* */ package quicktime.std.movies;
/* */
/* */ import quicktime.QTException;
/* */ import quicktime.QTSession;
/* */ import quicktime.qd.QDColor;
/* */ import quicktime.qd.QDPoint;
/* */ import quicktime.qd.QDRect;
/* */ import quicktime.std.image.Matrix;
/* */ import quicktime.util.QTByteObject;
/* */ import quicktime.util.QTUtils;
/* */
/* */ public final class TweenData extends QTByteObject
/* */ {
/* 26 */ private static boolean apriori = QTSession.apriori();
/* */ public static final int kQDPointNativeSize = 4;
/* */ public static final int kQDRectNativeSize = 8;
/* */ public static final int kRGBNativeSize = 6;
/* */ public static final int kModifierTrackGraphicsModeNativeSize = 10;
/* */ public static final int kMatrixNativeSize = 36;
/* */ public static final int kFixedPointNativeSize = 8;
/* */ public static final int kQTFloatDoubleNativeSize = 8;
/* */ private int type;
/* */
/* */ public TweenData(short paramShort1, short paramShort2)
/* */ throws QTException
/* */ {
/* 54 */ super(allocSize(1));
/* 55 */ this.type = 1;
/* */
/* 57 */ setShortAt(0, paramShort1);
/* */
/* 59 */ setShortAt(2, paramShort2);
/* */ }
/* */
/* */ public TweenData(int paramInt1, int paramInt2)
/* */ throws QTException
/* */ {
/* 70 */ super(allocSize(2));
/* 71 */ this.type = 2;
/* */
/* 73 */ setIntAt(0, paramInt1);
/* */
/* 75 */ setIntAt(4, paramInt2);
/* */ }
/* */
/* */ public TweenData(int paramInt, float paramFloat1, float paramFloat2)
/* */ throws QTException
/* */ {
/* 86 */ super(allocSize(paramInt));
/* 87 */ this.type = paramInt;
/* */
/* 89 */ switch (this.type)
/* */ {
/* */ case 3:
/* 92 */ setIntAt(0, QTUtils.X2Fix(paramFloat1));
/* */
/* 94 */ setIntAt(4, QTUtils.X2Fix(paramFloat2));
/* 95 */ break;
/* */ case 10:
/* 98 */ setFloatAt(0, paramFloat1);
/* */
/* 100 */ setFloatAt(4, paramFloat2);
/* */ }
/* */ }
/* */
/* */ public TweenData(double paramDouble1, double paramDouble2)
/* */ throws QTException
/* */ {
/* 112 */ super(allocSize(11));
/* 113 */ this.type = 11;
/* */
/* 115 */ setDoubleAt(0, paramDouble1);
/* */
/* 117 */ setDoubleAt(8, paramDouble2);
/* */ }
/* */
/* */ public TweenData(QDPoint paramQDPoint1, QDPoint paramQDPoint2)
/* */ throws QTException
/* */ {
/* 128 */ super(allocSize(4));
/* 129 */ this.type = 4;
/* */
/* 131 */ setIntAt(0, paramQDPoint1.getPoint());
/* */
/* 133 */ setIntAt(4, paramQDPoint2.getPoint());
/* */ }
/* */
/* */ public TweenData(QDRect paramQDRect1, QDRect paramQDRect2)
/* */ throws QTException
/* */ {
/* 143 */ super(allocSize(5));
/* 144 */ this.type = 5;
/* */
/* 146 */ setBytesAt(0, 8, paramQDRect1.getBytes(), 0);
/* */
/* 148 */ setBytesAt(8, 8, paramQDRect2.getBytes(), 0);
/* */ }
/* */
/* */ public TweenData(Matrix paramMatrix1, Matrix paramMatrix2)
/* */ throws QTException
/* */ {
/* 158 */ super(allocSize(7));
/* 159 */ this.type = 7;
/* */
/* 161 */ setBytesAt(0, 36, paramMatrix1.getBytes(), 0);
/* */
/* 163 */ setBytesAt(36, 36, paramMatrix2.getBytes(), 0);
/* */ }
/* */
/* */ public TweenData(QDColor paramQDColor1, QDColor paramQDColor2)
/* */ throws QTException
/* */ {
/* 173 */ super(allocSize(8));
/* 174 */ this.type = 8;
/* */
/* 176 */ setBytesAt(0, 6, paramQDColor1.getBytes(), 0);
/* */
/* 178 */ setBytesAt(6, 6, paramQDColor2.getBytes(), 0);
/* */ }
/* */
/* */ public TweenData(QDColor paramQDColor1, QDColor paramQDColor2, int paramInt)
/* */ throws QTException
/* */ {
/* 190 */ super(allocSize(9));
/* 191 */ this.type = 9;
/* */
/* 193 */ setIntAt(0, paramInt);
/* 194 */ setBytesAt(4, 6, paramQDColor1.getBytes(), 0);
/* */
/* 196 */ setIntAt(10, paramInt);
/* 197 */ setBytesAt(14, 6, paramQDColor2.getBytes(), 0);
/* */ }
/* */
/* */ public TweenData(float paramFloat1, float paramFloat2, float paramFloat3, float paramFloat4)
/* */ throws QTException
/* */ {
/* 209 */ super(allocSize(12));
/* 210 */ this.type = 12;
/* */
/* 212 */ setFloatAt(0, paramFloat1);
/* 213 */ setFloatAt(4, paramFloat2);
/* */
/* 215 */ setFloatAt(8, paramFloat3);
/* 216 */ setFloatAt(12, paramFloat4);
/* */ }
/* */
/* */ public int getType()
/* */ {
/* 225 */ return this.type;
/* */ }
/* */
/* */ private static int allocSize(int paramInt)
/* */ throws QTException
/* */ {
/* 234 */ int i = 0;
/* 235 */ switch (paramInt) {
/* */ case 1:
/* 237 */ i = 2;
/* 238 */ break;
/* */ case 2:
/* */ case 3:
/* */ case 10:
/* 243 */ i = 4;
/* 244 */ break;
/* */ case 4:
/* 246 */ i = 4;
/* 247 */ break;
/* */ case 5:
/* 249 */ i = 8;
/* 250 */ break;
/* */ case 7:
/* 252 */ i = 36;
/* 253 */ break;
/* */ case 8:
/* 255 */ i = 6;
/* 256 */ break;
/* */ case 9:
/* 258 */ i = 10;
/* 259 */ break;
/* */ case 11:
/* 261 */ i = 8;
/* 262 */ break;
/* */ case 12:
/* 264 */ i = 8;
/* */ case 6:
/* */ }
/* 267 */ if (i == 0) {
/* 268 */ throw new QTException("unsupported tween type");
/* */ }
/* 270 */ return i + i;
/* */ }
/* */ }
/* Location: Z:\System\Library\Java\Extensions\QTJava.zip
* Qualified Name: quicktime.std.movies.TweenData
* JD-Core Version: 0.6.2
*/