quicktime.app.display
Interface QTDrawable

All Superinterfaces:
Drawable, Listener, Transformable
All Known Subinterfaces:
QTDisplaySpace
All Known Implementing Classes:
QTEffect, QTImageDrawer, ImagePresenter, ImageViewer, GraphicsImporterDrawer, DSequenceFromMemory, MoviePlayer, QTPlayer, PresentationDrawer, SGDrawer

public interface QTDrawable
extends Drawable, Transformable

This interface is designed to work hand-in-hand with a QTCanvas object. Therefore, all classes which want to interact with a QTCanvas object, referred to as 'clients' must implement this interface.

The class that implements this interface must draw into the QDGraphics that is presented to the client - therefore this is not an appropriate interface for objects that are not QuickTime based drawing objects.

Note: A Java applet or application never directly calls any of these Drawable methods -- the QTCanvas object associated with this Drawable object will call these methods as needed.

QTExceptions can be thrown by any of these methods and would indicate that either the graphics environment has changed in some unexpected way or that the media object itself is in some unexpected state.


Method Summary
 Region getClip()
          This method allows you to get the current clipped Region of the Transformable.
 QDGraphics getGWorld()
          QTCanvas calls this method to get the destination QDGraphics of its client.
 void setClip(Region theClip)
          This method allows you to set a Transformable's clipping region.
 void setGWorld(QDGraphics cgp)
          QTCanvas calls this method to give the client the QDGraphics object it should use to do its drawing.
 void setLocation(int x, int y)
          A convenience method to set the position of a QTDrawable object.
 
Methods inherited from interface quicktime.app.display.Drawable
getDisplayBounds, redraw, setDisplayBounds
 
Methods inherited from interface quicktime.app.spaces.Listener
addedTo, removedFrom
 
Methods inherited from interface quicktime.app.image.Transformable
getMatrix, getOriginalSize, setMatrix
 

Method Detail

setLocation

public void setLocation(int x,
                        int y)
                 throws QTException
A convenience method to set the position of a QTDrawable object.
Parameters:
x - the new x location
y - the new y location

setGWorld

public void setGWorld(QDGraphics cgp)
               throws QTException
QTCanvas calls this method to give the client the QDGraphics object it should use to do its drawing. If the incoming QDGraphics is the QDGraphics.scratch then the drawable will not be visible and can disable itself. If a client is unable to set the graphics world it should throw an exception.
Parameters:
cgp - a QDGraphics object

getGWorld

public QDGraphics getGWorld()
                     throws QTException
QTCanvas calls this method to get the destination QDGraphics of its client.
Returns:
a QDGraphics object or null

setClip

public void setClip(Region theClip)
             throws QTException
This method allows you to set a Transformable's clipping region.
Parameters:
theClip - a Region that defines the new clipping region.

getClip

public Region getClip()
               throws QTException
This method allows you to get the current clipped Region of the Transformable.
Returns:
the clipping region