/* */ package quicktime.app.sg;
/* */
/* */ import java.awt.Dimension;
/* */ import quicktime.QTException;
/* */ import quicktime.QTRuntimeException;
/* */ import quicktime.QTSession;
/* */ import quicktime.app.display.QTDrawable;
/* */ import quicktime.app.time.TaskThread;
/* */ import quicktime.app.time.Tasking;
/* */ import quicktime.jdirect.QTNative;
/* */ import quicktime.qd.QDDimension;
/* */ import quicktime.qd.QDGraphics;
/* */ import quicktime.qd.QDRect;
/* */ import quicktime.qd.Region;
/* */ import quicktime.std.StdQTException;
/* */ import quicktime.std.image.Matrix;
/* */ import quicktime.std.sg.SGVideoChannel;
/* */ import quicktime.std.sg.SequenceGrabber;
/* */
/* */ /** @deprecated */
/* */ public class SGDrawer extends Tasking
/* */ implements QTDrawable
/* */ {
/* 36 */ private static TaskThread sgTasker = new TaskThread("Default SG Tasker", 20);
/* */ private SGVideoChannel chan;
/* 115 */ private boolean deferTasking = false;
/* */ private SGCaptureCallback stopTimeCallback;
/* */
/* */ /** @deprecated */
/* */ public SGDrawer(SGVideoChannel paramSGVideoChannel)
/* */ throws QTException
/* */ {
/* 47 */ this.chan = paramSGVideoChannel;
/* 48 */ setDefaultTasker(sgTasker);
/* */ }
/* */
/* */ /** @deprecated */
/* */ public SGVideoChannel getSGChannel()
/* */ {
/* 59 */ return this.chan;
/* */ }
/* */
/* */ /** @deprecated */
/* */ public SequenceGrabber getSequenceGrabber()
/* */ {
/* 65 */ return this.chan.getSequenceGrabber();
/* */ }
/* */
/* */ /** @deprecated */
/* */ public void addedTo(Object paramObject)
/* */ {
/* */ }
/* */
/* */ /** @deprecated */
/* */ public void removedFrom(Object paramObject)
/* */ {
/* */ }
/* */
/* */ /** @deprecated */
/* */ public QDGraphics getGWorld()
/* */ throws StdQTException
/* */ {
/* 93 */ return this.chan.getSequenceGrabber().getGWorld();
/* */ }
/* */
/* */ /** @deprecated */
/* */ public synchronized void setGWorld(QDGraphics paramQDGraphics)
/* */ throws QTException
/* */ {
/* 106 */ this.chan.getSequenceGrabber().setGWorld(paramQDGraphics, null);
/* 107 */ if (!QDGraphics.scratch.equals(paramQDGraphics)) {
/* 108 */ this.deferTasking = true;
/* */ }
/* */ else {
/* 111 */ stopTasking();
/* 112 */ this.chan.getSequenceGrabber().stop();
/* */ }
/* */ }
/* */
/* */ /** @deprecated */
/* */ public Dimension getInitialSize()
/* */ throws QTException
/* */ {
/* 125 */ QDRect localQDRect = this.chan.getBounds();
/* 126 */ Matrix localMatrix = this.chan.getMatrix();
/* 127 */ return new Dimension((int)(localQDRect.getWidth() / localMatrix.getSx()), (int)(localQDRect.getHeight() / localMatrix.getSy()));
/* */ }
/* */
/* */ /** @deprecated */
/* */ public QDDimension getOriginalSize()
/* */ throws QTException
/* */ {
/* 137 */ QDRect localQDRect = this.chan.getBounds();
/* 138 */ Matrix localMatrix = this.chan.getMatrix();
/* 139 */ return new QDDimension(localQDRect.getWidth() / localMatrix.getSx(), localQDRect.getHeight() / localMatrix.getSy());
/* */ }
/* */
/* */ /** @deprecated */
/* */ public Matrix getMatrix()
/* */ throws StdQTException
/* */ {
/* 149 */ return this.chan.getMatrix();
/* */ }
/* */
/* */ /** @deprecated */
/* */ public void setMatrix(Matrix paramMatrix)
/* */ throws QTException
/* */ {
/* 159 */ this.chan.setMatrix(paramMatrix);
/* */ }
/* */
/* */ /** @deprecated */
/* */ public synchronized void setDisplayBounds(QDRect paramQDRect)
/* */ throws StdQTException
/* */ {
/* 168 */ this.chan.setBounds(paramQDRect);
/* 169 */ if (this.deferTasking) {
/* 170 */ this.deferTasking = false;
/* 171 */ startTasking();
/* */ }
/* */ }
/* */
/* */ /** @deprecated */
/* */ public void setLocation(int paramInt1, int paramInt2)
/* */ throws QTException
/* */ {
/* 182 */ QDRect localQDRect = getDisplayBounds();
/* 183 */ localQDRect.setX(paramInt1);
/* 184 */ localQDRect.setY(paramInt2);
/* 185 */ setDisplayBounds(localQDRect);
/* */ }
/* */
/* */ /** @deprecated */
/* */ public QDRect getDisplayBounds()
/* */ throws StdQTException
/* */ {
/* 195 */ return this.chan.getBounds();
/* */ }
/* */
/* */ /** @deprecated */
/* */ public final synchronized void redraw(Region paramRegion)
/* */ throws StdQTException
/* */ {
/* 208 */ this.chan.getSequenceGrabber().update(paramRegion);
/* */ }
/* */
/* */ /** @deprecated */
/* */ public Region getClip()
/* */ throws QTException
/* */ {
/* 216 */ return this.chan.getClip();
/* */ }
/* */
/* */ /** @deprecated */
/* */ public void setClip(Region paramRegion)
/* */ throws StdQTException
/* */ {
/* 224 */ this.chan.setClip(paramRegion);
/* */ }
/* */
/* */ /** @deprecated */
/* */ public final void task()
/* */ throws StdQTException
/* */ {
/* 239 */ synchronized (QTNative.globalsLock) {
/* 240 */ if (!this.chan.getSequenceGrabber().idleMore()) {
/* 241 */ stopTasking();
/* 242 */ this.chan.getSequenceGrabber().stop();
/* 243 */ if (this.stopTimeCallback != null)
/* 244 */ new Thread(new Runnable() {
/* */ public void run() {
/* 246 */ SGDrawer.this.stopTimeCallback.finish(SGDrawer.this);
/* */ }
/* */ }).start();
/* */ }
/* */ }
/* */ }
/* */
/* */ /** @deprecated */
/* */ public void setSGCaptureCallback(SGCaptureCallback paramSGCaptureCallback)
/* */ {
/* 264 */ this.stopTimeCallback = paramSGCaptureCallback;
/* */ }
/* */
/* */ /** @deprecated */
/* */ public SGCaptureCallback getSGCaptureCallback()
/* */ {
/* 275 */ return this.stopTimeCallback;
/* */ }
/* */
/* */ public String toString()
/* */ {
/* 281 */ return getClass().getName() + "[" + this.chan + "]";
/* */ }
/* */
/* */ static
/* */ {
/* 31 */ if ((QTSession.isCurrentOS(4)) && (QTSession.getJavaVersion() >= 65540))
/* 32 */ throw new QTRuntimeException("Unsupported on Mac OS X and Java 1.4 and higher.");
/* */ }
/* */ }
/* Location: Z:\System\Library\Java\Extensions\QTJava.zip
* Qualified Name: quicktime.app.sg.SGDrawer
* JD-Core Version: 0.6.2
*/