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 Paintable

All Known Implementing Classes:
  JImagePainter

public interface Paintable

The Paintable interface allows for implementors of this interface to paint in the QTCanvas (via the QTImageDrawer).

Standard AWT paint calls can be made on the graphics object that is supplied in the paint call, with the rendered image being drawn by QuickTime.

See Also:
  `quicktime.app.display.QTImageDrawer`

Method Summary
`void` | `newSizeNotified(QTImageDrawer drawer, java.awt.Dimension d)` The Container object (QTImageDrawer) of the Paintable tells the paintable object the size of its available drawing surface.
`java.awt.Rectangle[]` | `paint(java.awt.Graphics g)` Paint on the graphics.

Method Detail

### newSizeNotified

    public void newSizeNotified(QTImageDrawer drawer,
                                java.awt.Dimension d)

  The Container object (QTImageDrawer) of the Paintable tells the paintable object the size of its available drawing surface. Any drawing done outside of these bounds (originating at 0,0) will be clipped. You should not call this method directly - it will be called by the QTImageDrawer object when its old pixel data is invalid and new pixel data is required.

  After this call is received by the Paintable it should return in the paint method a rectangle that describes the complete size of the image.

  Parameters:
    `drawer` - the QTImageDrawer that is notifiying the Paintable object that its size has changed.
    `d` - the new size of the offscreen image that the painter can paint into.

### paint

    public java.awt.Rectangle[] paint(java.awt.Graphics g)

  Paint on the graphics. The image that is painted on this graphics is rendered by QuickTime. You can supply an array of Rectangles that tell the parent which parts of the image were changed by this call. Only the pixels that are within these rectangles will be changed in the pixel data that is drawn by the QT image. Typically your first call to paint after being notified of a new size will return a Rectangle which covers the entire image with subsequent calls having the option of returning rectangles that describe only those regions of the pixel data that have changed. Returning null will indicate that no pixel data has changed Intelligent usage of this can improve drawing performance.
  Parameters:
    `g` - the graphics to paint on.
    `the` - specific areas within the paintable's bounds that were repainted in this call, or null if the there is no change to the existing pixel data.

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