Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## quicktime.app.image
Class DSequenceFromMemory

    java.lang.Object
      |
      +--quicktime.app.spaces.Sequencer
            |
            +--quicktime.app.image.DSequenceFromMemory

All Implemented Interfaces:
  Compositable, Drawable, DynamicImage, ImageSpec, Listener, QTDrawable, Transformable

public class DSequenceFromMemory
extends Sequencer
implements QTDrawable, DynamicImage

This class provides a mechanism for decompressing a sequence of images which were previously compressed using the CSequenceToMemory class.

The decompressed sequence is done with a number of default settings: it uses the port given to it by the displayables parent, it uses no matrix and no mask region, it uses ditherCopy as its transfer mode and it does not use an offscreen buffer or image buffer but writes directly to its destination.

See Also:
  `quicktime.app.image.CSequenceFromMemory`

Field Summary
`int` | `flags` The flags that are used in the redraw call.

Fields inherited from class quicktime.app.spaces.Sequencer
`kFirstFrame, kLastFrame, kLoopForwards, kLoopPalindrome, kNoLooping`

Constructor Summary
`DSequenceFromMemory(CSequenceToMemory sequenceInMemory)` The Movie Toolbox handles the details of decompressing image sequences in QuickTime movies.
`DSequenceFromMemory(EncodedImage data, ImageDescription description)` This will create an DSequence object from a single piece of data and its description.
`DSequenceFromMemory(GraphicsImporter importer)` This will create an DSequence object from a single piece of data and its description.
`DSequenceFromMemory(ImageSpec spec)` This will create an DSequence object from any object that implements the ImageSpec interface.

Method Summary
`void` | `addedTo(java.lang.Object interest)` This method is called by the specified object when the instance of the class that implements this interface is added to the object that is the source of the interest.
`Invalidator` | `addedToCompositor(SWCompositor c, TwoDSprite s)` Returns an object that invalidates a sprite.
`int` | `drawCurrentFrame(int inFlags)` Your application calls this method to decompress the current frame.
`Region` | `getClip()` Returns a region that defines the current clipping region for the object.
`ImageDescription` | `getDescription()` This method should return an ImageDescription that describes the image data that the class contains.
`QDRect` | `getDisplayBounds()` QTCanvas calls this method when it needs to ask the client for its boundary.
`GraphicsMode` | `getGraphicsMode()` This gets the current GraphicsMode for the compositor.
`QDGraphics` | `getGWorld()` QTCanvas calls this method to get the destination QDGraphics of its client.
`EncodedImage` | `getImage()` This method returns the actual image data of the current frame or null if there is no image data to return.
`java.awt.Dimension` | `getInitialSize()` Deprecated. since QTJava 4.0
`Matrix` | `getMatrix()` This will return the client's current display transformations
`QDDimension` | `getOriginalSize()` This method returns the original size before the transformations specified in the returned matrix are applied.
`DSequence` | `getSequence()` Returns the CSequence object - this may return null if you haven't called created the sequence.
`void` | `redraw(Region invalidRgn)` QTCanvas calls this method when the client should redraw itself.
`void` | `removedFrom(java.lang.Object interest)` This method is called by the specified object when the instance of the class that implements this interface is removed from the object that is the source of the interest.
`void` | `removedFromCompositor(SWCompositor c)` When a dynamic image class is removed from a SWCompositor this method is called to allow the class to cleanup any of the invalidation processes it had established in the addedToCompositor call.
`void` | `setClip(Region reg)` Sets a region that will define the clipping region for the object
`void` | `setDisplayBounds(QDRect bounds)` QTCanvas calls this method when it needs to tell the client to adjust its location, width and/or height.
`void` | `setGraphicsMode(GraphicsMode mode)` This sets the GraphicsMode for the Compositor when it draws its composited contents to its destination QDGraphics (typically the QTCanvas).
`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.
`void` | `setMatrix(Matrix matrix)` This will set the client's current Display Matrix
`int` | `size()` Return the number of image data objects (frames) that the object contains.
`java.lang.String` | `toString()` Return a string representation of this object

Methods inherited from class quicktime.app.spaces.Sequencer
`getCurrentFrame, getLooping, setCurrentFrame, setFrameNext, setFramePrevious, setLooping`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Field Detail

### flags

    public int flags

  The flags that are used in the redraw call.

Constructor Detail

### DSequenceFromMemory

    public DSequenceFromMemory(GraphicsImporter importer)
                        throws QTException

  This will create an DSequence object from a single piece of data and its description. It will NOT copy the incoming image, but will merely add them to the internal data storage.
  Parameters:
    `data` - the image data object.
    `description` - the ImageDescription object.

### DSequenceFromMemory

    public DSequenceFromMemory(EncodedImage data,
                               ImageDescription description)
                        throws QTException

  This will create an DSequence object from a single piece of data and its description. It will NOT copy the incoming image, but will merely add them to the internal data storage.
  Parameters:
    `data` - the image data object.
    `description` - the ImageDescription object.

### DSequenceFromMemory

    public DSequenceFromMemory(CSequenceToMemory sequenceInMemory)
                        throws QTException

  The Movie Toolbox handles the details of decompressing image sequences in QuickTime movies. If you need to decompress other sequences which were compressed via the CSequenceToMemory class, your application can create an instance of this DSequenceFromMemory class.
  Parameters:
    `sequenceInMemory` - a previously created CSequenceToMemory object

### DSequenceFromMemory

    public DSequenceFromMemory(ImageSpec spec)
                        throws QTException

  This will create an DSequence object from any object that implements the ImageSpec interface. It will NOT copy the incoming image, but will merely add it to the internal data storage.
  Parameters:
    `spec` - the ImageSpec object

Method Detail

### addedTo

    public void addedTo(java.lang.Object interest)

  This method is called by the specified object when the instance of the class that implements this interface is added to the object that is the source of the interest.
  Specified by:
    `addedTo` in interface `Listener`
  Parameters:
    `interest` - the object that is to be the source of interest for the the object that implements this interface.

### removedFrom

    public void removedFrom(java.lang.Object interest)

  This method is called by the specified object when the instance of the class that implements this interface is removed from the object that is the source of the interest.
  Specified by:
    `removedFrom` in interface `Listener`
  Parameters:
    `interest` - the object that was the source of interest for the the object that implements this interface.

### getGWorld

    public QDGraphics getGWorld()

  QTCanvas calls this method to get the destination QDGraphics of its client.
  Specified by:
    `getGWorld` in interface `QTDrawable`
  Returns:
    a QDGraphics object or null

### 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.
  Specified by:
    `setGWorld` in interface `QTDrawable`
  Parameters:
    `cgp` - a QDGraphics object

### setMatrix

    public void setMatrix(Matrix matrix)
                   throws StdQTException

  This will set the client's current Display Matrix
  Specified by:
    `setMatrix` in interface `Transformable`
  Parameters:
    `matrix` - the new Matrix

### getMatrix

    public Matrix getMatrix()
                     throws StdQTException

  This will return the client's current display transformations
  Specified by:
    `getMatrix` in interface `Transformable`
  Returns:
    the display transformations of the client

### getInitialSize

    public java.awt.Dimension getInitialSize()
                                      throws QTException

  Deprecated. since QTJava 4.0

  This method returns the original size before the transformations specified in the returned matrix are applied.
  Returns:
    the runtime type is a java.awt.Dimension - the return value can be cast to this Class - however getOriginalSize should be used.
  See Also:
    `()`

### getOriginalSize

    public QDDimension getOriginalSize()
                                throws QTException

  This method returns the original size before the transformations specified in the returned matrix are applied.
  Specified by:
    `getOriginalSize` in interface `Transformable`
  Returns:
    the original size

### setDisplayBounds

    public void setDisplayBounds(QDRect bounds)
                          throws StdQTException

  QTCanvas calls this method when it needs to tell the client to adjust its location, width and/or height. All values are in pixels.
  Specified by:
    `setDisplayBounds` in interface `Drawable`
  Parameters:
    `bounds` - the new size and location.

### setLocation

    public void setLocation(int x,
                            int y)
                     throws QTException

  A convenience method to set the position of a QTDrawable object.
  Specified by:
    `setLocation` in interface `QTDrawable`
  Parameters:
    `x` - the new x location
    `y` - the new y location

### getDisplayBounds

    public QDRect getDisplayBounds()

  QTCanvas calls this method when it needs to ask the client for its boundary. All values are in pixels.
  Specified by:
    `getDisplayBounds` in interface `Drawable`
  Returns:
    the boundary of the client

### redraw

    public final void redraw(Region invalidRgn)
                      throws StdQTException

  QTCanvas calls this method when the client should redraw itself. If the canvas is able to discern that only a part of the client's drawing area needs to be redrawn - then this area shall be passed in using the invalidRgn. Otherwise this will be null in which case the client should redraw itself entirely.
  Specified by:
    `redraw` in interface `Drawable`
  Parameters:
    `invalidRgn` - the invalidRgn that the client should redraw

### getClip

    public Region getClip()
                   throws StdQTException

  Returns a region that defines the current clipping region for the object.
  Specified by:
    `getClip` in interface `QTDrawable`
  Returns:
    the clipping region

### setClip

    public void setClip(Region reg)
                 throws StdQTException

  Sets a region that will define the clipping region for the object
  Specified by:
    `setClip` in interface `QTDrawable`
  Parameters:
    `reg` - the new clipping region

### getDescription

    public ImageDescription getDescription()
                                    throws QTException

  This method should return an ImageDescription that describes the image data that the class contains.
  Specified by:
    `getDescription` in interface `ImageSpec`
  Returns:
    the ImageDescription of an Image

### getImage

    public EncodedImage getImage()
                          throws StdQTException

  This method returns the actual image data of the current frame or null if there is no image data to return.
  Specified by:
    `getImage` in interface `ImageSpec`
  Returns:
    the image data

### size

    public int size()

  Return the number of image data objects (frames) that the object contains.
  Overrides:
    `size` in class `Sequencer`
  Returns:
    the number of frames if the image is the sequence of frames

### drawCurrentFrame

    public int drawCurrentFrame(int inFlags)
                         throws StdQTException

  Your application calls this method to decompress the current frame.
  Note: See the QTImage class and Inside Mac QuickTime documentation for more information on valid flag values.
  Parameters:
    `inFlags` - flags providing further control information
  Returns:
    the outFlags value

### setGraphicsMode

    public void setGraphicsMode(GraphicsMode mode)
                         throws QTException

  This sets the GraphicsMode for the Compositor when it draws its composited contents to its destination QDGraphics (typically the QTCanvas).
  Specified by:
    `setGraphicsMode` in interface `Compositable`
  Following copied from interface: `quicktime.app.image.Compositable`
  Parameters:
    `gMode` - Specifies the graphics mode.

### getGraphicsMode

    public GraphicsMode getGraphicsMode()

  This gets the current GraphicsMode for the compositor.
  Specified by:
    `getGraphicsMode` in interface `Compositable`
  Following copied from interface: `quicktime.app.image.Compositable`
  Returns:
    a Graphics mode object

### addedToCompositor

    public Invalidator addedToCompositor(SWCompositor c,
                                         TwoDSprite s)

  Returns an object that invalidates a sprite. When a DynamicImage is a member of a SWompositor and the DynamicImage presents a changing image (for example a movie), the TwoDSprite that presents that image in the SWCompositor must be invalidated so that it will redraw the Sprites image in the next composit cycle. The Invalidator object is used to perform this function by the SWCompositor if the object itself cannot perform the invalidation. Can return null if the DynamicImage does not require the SWCompositor to invalidate it (or the object is in a state where its image won't change).

  The Invalidators provided with objects that implement the DynamicImage interface will execute at the scale and period of the Compositor when they are created.

  Specified by:
    `addedToCompositor` in interface `DynamicImage`
  Parameters:
    `c` - the Compositor in which the DynamicImage is a member
    `s` - the TwoDSprite that is presenting the DynamicImage's image in the Compositor. This is the sprite that must be invalidated.
  Returns:
    an Invalidator or null if invalidation is not required
  See Also:
    `quicktime.app.display.SWCompositor`

### removedFromCompositor

    public void removedFromCompositor(SWCompositor c)

  When a dynamic image class is removed from a SWCompositor this method is called to allow the class to cleanup any of the invalidation processes it had established in the addedToCompositor call.
  Specified by:
    `removedFromCompositor` in interface `DynamicImage`
  Parameters:
    `c` - the SWCompositor it is being removed from

### getSequence

    public DSequence getSequence()

  Returns the CSequence object - this may return null if you haven't called created the sequence.
  Returns:
    the sequence

### toString

    public java.lang.String toString()

  Return a string representation of this object
  Overrides:
    `toString` in class `Sequencer`

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD