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
Interface Redrawable

All Known Implementing Classes:
  QTEffect, QTImageDrawer, CompositableEffect, QTImageProducer

public interface Redrawable

This interface is used to describe objects that have image data that should be redrawn when a redraw call is issued. Typically if you have a static image then there is no extra work that has to be done once you have the image data - it can just be redrawn as is. However there are some image objects that may have image data that could change and therefore those objects have potentially changing image data. The two objects that implement this interface currently are the QTEffect and the QTImageDrawer; effects because they may or may not alter the pixel data depending on the type of the effect and the QTImageDrawer depending on whether its Paintable client will paint a changing image. This delineates the behaviour of the redraw method of the Drawable interface.

The set and is Redrawing methods are used to control the redrawing characteristics of the Redrawable object. For instance you may have an object that is a QTTransition and whilst you are transitioning this object you require that the redraw call redraws the current frame of the transition. So in this case setRedrawing is set to true. Once the transition is complete though and if the transition is now presenting a static image there is not need to explicitly redraw the object.

The isSingleFrame() method determines if an Invalidator is created when the Redrawable is added to the Compositor - if the Redrawable is a single frame object then no Invalidator is created as the Compositor assumes that the Redrawable is presenting a static image and thus requires no explicit invalidation. The isSingleFrame() method however has no actual effect on whether an object will redraw or not - just on the creation of the Invalidator.

See Also:
  `QTEffect`, `QTImageDrawer`, `quicktime.app.display.SWCompositor`

Field Summary
`static int` | `kMultiFrame` These flags are used in the construction of Redrawable to signify that the redrawable is a single or multi-framed (dynamic) image source.
`static int` | `kSingleFrame` These flags are used in the construction of Redrawable to signify that the redrawable is a single or multi-framed (dynamic) image source.

Method Summary
`boolean` | `isRedrawing()` Returns true if the image data may be altered or different upon different calls of the redraw method of the QTDrawable interface.
`boolean` | `isSingleFrame()` Returns true if the Redrawable only has a single frame to render and thus will never need to re-acquire or redraw its image.
`void` | `setRedrawing(boolean redrawFlag)` If true then the redraw method of the object will fetch new image data from its image source.

Field Detail

### kSingleFrame

    public static final int kSingleFrame

  These flags are used in the construction of Redrawable to signify that the redrawable is a single or multi-framed (dynamic) image source. In some case certain optimizations are possible throguh knowing the Redrawable's drawing requirements. These options are generally set at construction time and the isSingleFrame method returns which option was set.

### kMultiFrame

    public static final int kMultiFrame

  These flags are used in the construction of Redrawable to signify that the redrawable is a single or multi-framed (dynamic) image source. In some case certain optimizations are possible throguh knowing the Redrawable's drawing requirements. These options are generally set at construction time and the isSingleFrame method returns which option was set.

Method Detail

### setRedrawing

    public void setRedrawing(boolean redrawFlag)

  If true then the redraw method of the object will fetch new image data from its image source.
  Parameters:
    `redrawFlag` - boolean determining whether the current image is redrawn (false) of fresh or updated image data is first retrieved (true).

### isRedrawing

    public boolean isRedrawing()

  Returns true if the image data may be altered or different upon different calls of the redraw method of the QTDrawable interface.

### isSingleFrame

    public boolean isSingleFrame()

  Returns true if the Redrawable only has a single frame to render and thus will never need to re-acquire or redraw its image. Certain Redrawable objects are able to optimise their resources knowing this constraint.
  Returns:
    a boolean

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