Examples of QDColor


Examples of quicktime.qd.QDColor

      TextMediaHandler handler = (TextMediaHandler)textMedia.getHandler();
      textMedia.beginEdits();
      byte[] msgBytes = text.getBytes();
      QTPointer msgPoint = new QTPointer(msgBytes);
      handler.addTextSample(msgPoint, QDFont.getFNum(fontName), fontSize, style,
        new QDColor(fgColor[0] / 255f, fgColor[1] / 255f, fgColor[2] / 255f),
        new QDColor(bgColor[0] / 255f, bgColor[1] / 255f, bgColor[2] / 255f),
        QDConstants.teJustLeft, textBox, dfFlag, QDFont.getFNum(fontName), 0, 0,
        QDColor.white, Math.round(duration * movie.getTimeScale()));
      textMedia.endEdits();
      textTrack.insertMedia(Math.round(start * movie.getTimeScale()), 0,
        textMedia.getDuration(), 1);
View Full Code Here

Examples of quicktime.qd.QDColor

      StdQTConstants.tcdfShowTimeCode);
    TCTextOptions tcTextOptions = timeCoder.getDisplayOptions();
    tcTextOptions.setTXSize(fontSize);
    tcTextOptions.setTXFace(style);
    tcTextOptions.setTXFont(QDFont.getFNum(fontName));
    tcTextOptions.setForeColor(new QDColor(fgColor[0] / 255f, fgColor[1] / 255f,
      fgColor[2] / 255f));

    // if transparency is indicated, set background color to a special value
    if (bgColor[0] == -1)
    {
      tcTextOptions.setBackColor(new QDColor(0.1f, 0.7f, 0.43f));
    } // if (bgColor[0] == -1)
    else
    {
      tcTextOptions.setBackColor(new QDColor(bgColor[0] / 255f,
        bgColor[1] / 255f, bgColor[2] / 255f));
    } // else
    timeCoder.setDisplayOptions(tcTextOptions);

    // set up a sample as a 4-byte array in a QTHandle
    int frameNumber = timeCoder.toFrameNumber(tcTime, tcDef);
    int frameNums[] = new int[1];

    // BOOK ERRATA: this is buggy on Windows for time codes other
    // than 00:00:00;00.  You need to adjust for endianness, as
    // seen in the revised (uncommented) line.
    // frameNums[0] = frameNumber;
    frameNums[0] = EndianOrder.flipNativeToBigEndian32(frameNumber);
    QTHandle frameNumHandle = new QTHandle (4, false);
    frameNumHandle.copyFromArray(0, frameNums, 0, 1);

    // create a time code description (sample to be added)
    TimeCodeDescription tcDesc = new TimeCodeDescription();
    tcDesc.setTimeCodeDef (tcDef);

    // add the sample to the TimeCodeMedia
    tcMedia.beginEdits();
    tcMedia.addSample(frameNumHandle, 0, frameNumHandle.getSize(),
      movie.getDuration(), tcDesc, 1, 0);
    tcMedia.endEdits();

    // insert media into track
    tcTrack.insertMedia(0, 0, tcMedia.getDuration(), 1);

    // set a transparent-background GrahpicsMode
    QDRect moveFrom = new QDRect(0, 0, width, height);
    QDRect moveTo = new QDRect(x, y, width, height);
    Matrix matrix = new Matrix();
    matrix.rect(moveFrom, moveTo);
    tcTrack.setMatrix (matrix);

    // if transparency is indicated, make the special value the transparent
    // color
    if (bgColor[0] == -1)
    {
      timeCoder.setGraphicsMode(new GraphicsMode(QDConstants.transparent,
        new QDColor(0.1f, 0.7f, 0.43f)));
    } // if (bgColor[0] == -1)
    return movie;
  } // addTimeCode(Movie, String, String, int, int[], int[], int, int, int, int)
View Full Code Here

Examples of quicktime.qd.QDColor

  // pp. 166~171
  public static Movie chromaKey(Movie movFore, Movie movBack, int red,
    int green, int blue)
  {
    Movie result = null;
    QDColor key = new QDColor((float)red / 255, (float)green / 255,
      (float)blue / 255);
    try
    {
      result = new Movie();
View Full Code Here

Examples of quicktime.qd.QDColor

/*     */     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);
/*     */     }
/*     */
View Full Code Here

Examples of quicktime.qd.QDColor

/*     */
/*     */   public final GraphicsMode getDefaultGraphicsMode()
/*     */     throws QTException
/*     */   {
/* 752 */     int[] arrayOfInt = { 0 };
/* 753 */     QDColor localQDColor = new QDColor();
/* 754 */     int i = GraphicsImportGetDefaultGraphicsMode(_ID(), arrayOfInt, localQDColor.getRGBColor());
/* 755 */     StdQTException.checkError(i);
/* 756 */     return new GraphicsMode(arrayOfInt[0], localQDColor);
/*     */   }
View Full Code Here

Examples of quicktime.qd.QDColor

/* 234 */     setBytesAt(58, 6, paramQDColor.getBytes(), 0);
/*     */   }
/*     */
/*     */   public QDColor getOpColor()
/*     */   {
/* 241 */     QDColor localQDColor = new QDColor();
/* 242 */     getBytesAt(58, 6, localQDColor.getBytes(), 0);
/* 243 */     return localQDColor;
/*     */   }
View Full Code Here
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.