/* */ package quicktime.app.view;
/* */
/* */ import java.awt.Dimension;
/* */ import quicktime.QTException;
/* */ import quicktime.io.QTFile;
/* */ import quicktime.qd.QDDimension;
/* */ import quicktime.qd.QDGraphics;
/* */ import quicktime.qd.QDRect;
/* */ import quicktime.qd.Region;
/* */ import quicktime.std.StdQTException;
/* */ import quicktime.std.image.GraphicsImporter;
/* */ import quicktime.std.image.GraphicsMode;
/* */ import quicktime.std.image.ImageDescription;
/* */ import quicktime.std.image.Matrix;
/* */ import quicktime.std.movies.media.DataRef;
/* */ import quicktime.util.EncodedImage;
/* */ import quicktime.util.RawEncodedImage;
/* */
/* */ public class GraphicsImporterDrawer
/* */ implements Presentable
/* */ {
/* */ private GraphicsImporter mGraphicsImporter;
/* */
/* */ public GraphicsImporterDrawer(GraphicsImporter paramGraphicsImporter)
/* */ {
/* 40 */ this.mGraphicsImporter = paramGraphicsImporter;
/* */ }
/* */
/* */ public GraphicsImporterDrawer(QTFile paramQTFile)
/* */ throws QTException
/* */ {
/* 48 */ this.mGraphicsImporter = new GraphicsImporter(paramQTFile);
/* */ }
/* */
/* */ public GraphicsImporterDrawer(DataRef paramDataRef)
/* */ throws QTException
/* */ {
/* 56 */ this.mGraphicsImporter = new GraphicsImporter(paramDataRef);
/* */ }
/* */
/* */ public GraphicsImporter getImporter()
/* */ {
/* 66 */ return this.mGraphicsImporter;
/* */ }
/* */
/* */ public Region getClip()
/* */ throws QTException
/* */ {
/* 72 */ return this.mGraphicsImporter.getClip();
/* */ }
/* */
/* */ public void setClip(Region paramRegion)
/* */ throws StdQTException
/* */ {
/* 79 */ this.mGraphicsImporter.setClip(paramRegion);
/* */ }
/* */
/* */ public ImageDescription getDescription()
/* */ throws StdQTException
/* */ {
/* 88 */ return (ImageDescription)this.mGraphicsImporter.getImageDescription().clone();
/* */ }
/* */
/* */ public EncodedImage getImage()
/* */ throws QTException
/* */ {
/* 97 */ int i = this.mGraphicsImporter.getDataOffset();
/* 98 */ int j = this.mGraphicsImporter.getDataSize();
/* 99 */ RawEncodedImage localRawEncodedImage = new RawEncodedImage(j, true);
/* */
/* 101 */ this.mGraphicsImporter.readData(localRawEncodedImage, i, j);
/* 102 */ return localRawEncodedImage;
/* */ }
/* */
/* */ public void addedTo(Object paramObject)
/* */ {
/* */ }
/* */
/* */ public void removedFrom(Object paramObject)
/* */ {
/* */ }
/* */
/* */ public QDGraphics getGWorld()
/* */ throws StdQTException
/* */ {
/* 128 */ return this.mGraphicsImporter.getGWorld();
/* */ }
/* */
/* */ public void setGWorld(QDGraphics paramQDGraphics)
/* */ throws StdQTException
/* */ {
/* 140 */ this.mGraphicsImporter.setGWorld(paramQDGraphics, null);
/* */ }
/* */
/* */ /** @deprecated */
/* */ public Dimension getInitialSize()
/* */ throws QTException
/* */ {
/* 150 */ QDRect localQDRect = this.mGraphicsImporter.getNaturalBounds();
/* 151 */ return new Dimension(localQDRect.getWidth(), localQDRect.getHeight());
/* */ }
/* */
/* */ public QDDimension getOriginalSize()
/* */ throws QTException
/* */ {
/* 159 */ QDRect localQDRect = this.mGraphicsImporter.getNaturalBounds();
/* 160 */ return new QDDimension(localQDRect.getWidth(), localQDRect.getHeight());
/* */ }
/* */
/* */ public Matrix getMatrix()
/* */ throws StdQTException
/* */ {
/* 169 */ return this.mGraphicsImporter.getMatrix();
/* */ }
/* */
/* */ public void setMatrix(Matrix paramMatrix)
/* */ throws QTException
/* */ {
/* 177 */ this.mGraphicsImporter.setMatrix(paramMatrix);
/* */ }
/* */
/* */ public void setDisplayBounds(QDRect paramQDRect)
/* */ throws StdQTException
/* */ {
/* 187 */ this.mGraphicsImporter.setBoundsRect(paramQDRect);
/* */ }
/* */
/* */ public void setLocation(int paramInt1, int paramInt2)
/* */ throws QTException
/* */ {
/* 196 */ QDRect localQDRect = getDisplayBounds();
/* 197 */ localQDRect.setX(paramInt1);
/* 198 */ localQDRect.setY(paramInt2);
/* 199 */ setDisplayBounds(localQDRect);
/* */ }
/* */
/* */ public QDRect getDisplayBounds()
/* */ throws StdQTException
/* */ {
/* 209 */ return this.mGraphicsImporter.getBoundsRect();
/* */ }
/* */
/* */ public final synchronized void redraw(Region paramRegion)
/* */ throws QTException
/* */ {
/* 221 */ if (paramRegion != null) {
/* 222 */ Region localRegion = this.mGraphicsImporter.getClip();
/* 223 */ this.mGraphicsImporter.setClip(paramRegion);
/* 224 */ this.mGraphicsImporter.draw();
/* 225 */ this.mGraphicsImporter.setClip(localRegion);
/* */ } else {
/* 227 */ this.mGraphicsImporter.draw();
/* */ }
/* */ }
/* */
/* 231 */ public boolean isSingleFrame() { return true; }
/* */
/* */
/* */ public GraphicsMode getGraphicsMode()
/* */ throws StdQTException
/* */ {
/* 239 */ return this.mGraphicsImporter.getGraphicsMode();
/* */ }
/* */
/* */ public void setGraphicsMode(GraphicsMode paramGraphicsMode)
/* */ throws StdQTException
/* */ {
/* 247 */ this.mGraphicsImporter.setGraphicsMode(paramGraphicsMode);
/* */ }
/* */
/* */ public String toString()
/* */ {
/* 252 */ return getClass().getName() + "[" + this.mGraphicsImporter + "]";
/* */ }
/* */ }
/* Location: Z:\System\Library\Java\Extensions\QTJava.zip
* Qualified Name: quicktime.app.view.GraphicsImporterDrawer
* JD-Core Version: 0.6.2
*/