|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--quicktime.app.image.QTImageDrawer
Enables standard java drawing commands and graphics objects to have their content rendered by QuickTime within a QuickTime graphics space. The QTImageDrawer is a parent container for an object that implements the Paintable interface - which is the object that actually does the drawing using standard java.awt paint commands and graphics objects. The QTImageDrawer implements the DynamicImage interface so can be added to the quicktime.app.display.Compositor object and thus used to draw into the same display space as other QuickTime generated content, or can be a direct client of a QTCanvas.
The isSingleFrame flag that is specified in the constructor allows optimisations to be made by the QTImageDrawer. If this flag is set to Redrawable.kSingleFrame then the QTImageDrawer will only call its Paintable object once to capture the image it Paintable draws. It will then discard all of the objects it has acquired to allow the paint call to the Paintable. If kMultiFrame is specified then on each redraw call the Paintable's paint call is called and the result is redrawn. If the QTImageDrawer is a member of the SWCompositor a similar efficiency can be achieved - if kSingleFrame is specified then when the drawer is added to the Compositor it does not require invalidation so does not create an invalidator as its image data is static. If kMultiFrame is specified then an invalidator is created.
An application can explicitly call prepaint - which is the method that calls the Paintable's paint method at any time. If the application is itself controlling the prepaint call then it will probably want to set and reset the isRedrawing flag as the redraw method determines whether to call prepaint or not based on the value of this flag. Once image data has been captured using the prepaint call to see the results in destination QDGraphics redraw must be called. Thus if an application is calling prepaint itself it will likely want to then setRedrawing to false and would only require redrawing to be set to true if it requires any consequent calls of the redraw method to re-capture image data from a call to prepaint.
The Invalidator determines if the QTImageDrawer requires redrawing and invalidation based on the value of the isRedrawing flag - it redraws and invalidates if isRedrawing returns true. If the application is controlling the prepaint calls (and thus would typically set redrawing to false) then it should invalidate the sprite presenter of the QTImageDrawer.
quicktime.app.display.Compositor,
quicktime.app.display.Paintable| Field Summary | |
static int |
kMultiFrameRetain
Deprecated. since QTJava 6.1 |
| Fields inherited from interface quicktime.app.image.Redrawable |
kMultiFrame, kSingleFrame |
| Constructor Summary | |
QTImageDrawer(java.awt.Image image)
Deprecated. since QTJava 6.1 |
|
QTImageDrawer(java.awt.Image image,
java.awt.Dimension initialSize)
Deprecated. since QTJava 6.1 |
|
QTImageDrawer(Paintable painter,
java.awt.Dimension initialSize,
int isSingleFrame)
Deprecated. since QTJava 6.1 |
|
| Method Summary | |
void |
addedTo(java.lang.Object interest)
Deprecated. since QTJava 6.1 |
Invalidator |
addedToCompositor(SWCompositor c,
TwoDSprite s)
Deprecated. since QTJava 6.1 |
boolean |
addNotifyListener(NotifyListener nl)
Deprecated. since QTJava 6.1 |
int |
export(GraphicsExporter exporter)
Deprecated. since QTJava 6.1 |
int |
export(GraphicsExporter exporter,
QDGraphics offscreenGWorld)
Deprecated. since QTJava 6.1 |
Region |
getClip()
Deprecated. since QTJava 6.1 |
ImageDescription |
getDescription()
Deprecated. since QTJava 6.1 |
QDRect |
getDisplayBounds()
Deprecated. since QTJava 6.1 |
GraphicsMode |
getGraphicsMode()
Deprecated. since QTJava 6.1 |
QDGraphics |
getGWorld()
Deprecated. since QTJava 6.1 |
EncodedImage |
getImage()
Deprecated. since QTJava 6.1 |
java.awt.Dimension |
getInitialSize()
Deprecated. since QTJava 4.0 |
Matrix |
getMatrix()
Deprecated. since QTJava 6.1 |
QDDimension |
getOriginalSize()
Deprecated. since QTJava 4.0 |
Paintable |
getPaintable()
Deprecated. since QTJava 6.1 |
java.awt.Dimension |
getSize()
Deprecated. since QTJava 6.1 |
boolean |
isRedrawing()
Deprecated. since QTJava 6.1 |
boolean |
isSingleFrame()
Deprecated. since QTJava 6.1 |
Region |
prepaint()
Deprecated. since QTJava 6.1 |
void |
redraw(Region invalidRgn)
Deprecated. since QTJava 6.1 |
void |
removedFrom(java.lang.Object interest)
Deprecated. since QTJava 6.1 |
void |
removedFromCompositor(SWCompositor c)
Deprecated. since QTJava 6.1 |
void |
setClip(Region reg)
Deprecated. since QTJava 6.1 |
void |
setDisplayBounds(QDRect bounds)
Deprecated. since QTJava 6.1 |
void |
setGraphicsMode(GraphicsMode mode)
Deprecated. since QTJava 6.1 |
void |
setGWorld(QDGraphics cgp)
Deprecated. since QTJava 6.1 |
void |
setLocation(int x,
int y)
Deprecated. since QTJava 6.1 |
void |
setMatrix(Matrix matrix)
Deprecated. since QTJava 6.1 |
void |
setRedrawing(boolean redrawFlag)
Deprecated. since QTJava 6.1 |
ImagePresenter |
toImagePresenter()
Deprecated. since QTJava 6.1 |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final int kMultiFrameRetain
| Constructor Detail |
public QTImageDrawer(Paintable painter,
java.awt.Dimension initialSize,
int isSingleFrame)
painter - the java object that will paint into the space reserved by the QTImageDrawerinitialSize - the size (with origin of 0, 0) that defines the drawing size available to the painter.isSingleFrame - if the kSingleFrame flag is set the Redrawable will capture the
the results of the Paintable's paint call and then discard all of the resources required
to call its Paintable (and the Paintable itself). In this case the Paintable's paint method
will only be called once. If kSingleFrame is not set the Paintable's paint call will be called
whenever redraw() is called and the isRedrawing flag is true.
public QTImageDrawer(java.awt.Image image)
throws QTAppException
image - the java.awt.Image to capture. The size of this image must be known before
this constructor can be used.JImagePainter
public QTImageDrawer(java.awt.Image image,
java.awt.Dimension initialSize)
image - the java.awt.Image to capture.initialSize - the scaled drawing size of the image.JImagePainter| Method Detail |
public Paintable getPaintable()
public int export(GraphicsExporter exporter)
throws QTException
exporter - the GraphicsExporter that will be used to export the pixel image
QTException
public int export(GraphicsExporter exporter,
QDGraphics offscreenGWorld)
throws QTException
exporter - the GraphicsExporter that will be used to export the pixel imageoffscreenGWorld - the destination QDGraphics that is used to export (ie. the pixel image).
QTExceptionpublic java.awt.Dimension getSize()
public final Region getClip()
throws QTException
getClip in interface QTDrawableQTException
public final void setClip(Region reg)
throws StdQTException
setClip in interface QTDrawablereg - the new clipping region
StdQTException
public ImagePresenter toImagePresenter()
throws QTException
QTException
public ImageDescription getDescription()
throws QTException
getDescription in interface ImageSpecQTException
public EncodedImage getImage()
throws QTException
getImage in interface ImageSpecQTException
public final Matrix getMatrix()
throws StdQTException
getMatrix in interface TransformableStdQTException
public final void setMatrix(Matrix matrix)
throws QTException
setMatrix in interface Transformablematrix - a Matrix object that specifies how to transform the image during
decompression
QTException
public java.awt.Dimension getInitialSize()
throws QTException
QTException()
public QDDimension getOriginalSize()
throws QTException
getOriginalSize in interface TransformableQTException()public final QDGraphics getGWorld()
getGWorld in interface QTDrawable
public void setGWorld(QDGraphics cgp)
throws QTException
setGWorld in interface QTDrawablecgp - a QDGraphics object
QTException
public void setDisplayBounds(QDRect bounds)
throws StdQTException
setDisplayBounds in interface Drawablebounds - the new size and location.
StdQTException
public void setLocation(int x,
int y)
throws QTException
setLocation in interface QTDrawablex - the new x locationy - the new y location
QTExceptionpublic QDRect getDisplayBounds()
getDisplayBounds in interface Drawable
public void redraw(Region invalidRgn)
throws QTException
This call will just redraw the current image. If you want to have the Paintable client repaint itself then you must set the redrawing flag to true.
redraw in interface DrawableinvalidRgn - the invalidRgn that the client should redraw
QTExceptionsetRedrawing(boolean)public void setRedrawing(boolean redrawFlag)
setRedrawing in interface RedrawableredrawFlag - boolean determining whether the current image is redrawn (false)
of fresh or updated image data is first retrieved (true).public boolean isSingleFrame()
isSingleFrame in interface Redrawablepublic boolean isRedrawing()
isRedrawing in interface Redrawable
public Region prepaint()
throws QTException
QTException
public void setGraphicsMode(GraphicsMode mode)
throws QTException
setGraphicsMode in interface Compositablemode - Specifies the graphics mode.
QTExceptionpublic GraphicsMode getGraphicsMode()
getGraphicsMode in interface Compositable
public Invalidator addedToCompositor(SWCompositor c,
TwoDSprite s)
The Invalidators provided with objects that implement the DynamicImage interface will execute at the scale and period of the Compositor when they are created.
This call will not return an Invalidator if the QTImageDrawer is presenting a single frame image as the assumption is made that the image data is not changing.
addedToCompositor in interface DynamicImagec - the Compositor in which the DynamicImage is a members - the TwoDSprite that is presenting the DynamicImage's image in
the Compositor. This is the sprite that must be invalidated.
quicktime.app.display.SWCompositorpublic void removedFromCompositor(SWCompositor c)
removedFromCompositor in interface DynamicImagec - the SWCompositor it is being removed frompublic void addedTo(java.lang.Object interest)
addedTo in interface Listenerinterest - the object that is to be the source of interest for the
the object that implements this interface.public void removedFrom(java.lang.Object interest)
removedFrom in interface Listenerinterest - the object that was the source of interest for the
the object that implements this interface.public boolean addNotifyListener(NotifyListener nl)
addNotifyListener in interface Notifiernl - the NotifyListener that is interested in something from this Notifier
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||