All Packages Class Hierarchy This Package Previous Next Index
Interface quicktime.app.image.Paintable
- 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:
- QTImageDrawer
-
newSizeNotified(QTImageDrawer, Dimension)
- The Container object (QTImageDrawer) of the Paintable tells the paintable object the size of its available
drawing surface.
-
paint(Graphics)
- Paint on the graphics.
newSizeNotified
public abstract void newSizeNotified(QTImageDrawer drawer,
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 abstract Rectangle[] paint(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.
All Packages Class Hierarchy This Package Previous Next Index