quicktime.qd
Class GDevice

java.lang.Object
  |
  +--quicktime.QTObject
        |
        +--quicktime.util.QTHandleRef
              |
              +--quicktime.qd.GDevice
All Implemented Interfaces:
quicktime.jdirect.InterfaceLib, quicktime.jdirect.PrimitivesLib, quicktime.jdirect.QuickTimeLib, quicktime.jdirect.SharedLibrary, com.apple.jdirect.SharedLibrary

public final class GDevice
extends QTHandleRef
implements quicktime.jdirect.QuickTimeLib

Refer to GDevice in QuickDraw


Fields inherited from interface quicktime.jdirect.QuickTimeLib
JDirect_MacOSX, libraryInstance, name
 
Method Summary
static GDevice fromSequenceGrabber(SequenceGrabber sg)
          Returns the current device of the sequence grabber.
static GDevice get()
          Returns the current graphic device.
 QDRect getBounds()
          Returns the global Bounds associated with this gDevice
 int getFlags()
          Returns the current scale of the screen graphics device
static GDevice getList()
          Returns the first graphic device in the device list.
static GDevice getMain()
          Returns the graphic device for the main screen.
static GDevice getMax(QDRect globalRect)
          Returns the graphic device with the greatest pixel depth.
 GDevice getNext()
          Returns the graphic device that is the next device from this in the device list.
 PixMap getPixMap()
          Returns the PixMap associated with this gDevice
 float getScale()
          Returns the current scale of the screen graphics device
 float hasScale(int depth, float scale)
          Returns the closest possible scaling that a particular screen device can be set to in a given pixel depth
 void init(int qdRefNum, int mode)
          Initialises the instance of the Graphics Device.
 void set()
          Sets this GDevice as the current device.
 void setAttribute(int attribute, boolean value)
          Set the attributes of a graphics device.
 void setScale(int scale, int flags)
          Sets the current scale of the screen graphics device
 boolean testAttribute(int attribute)
          Determines whether the flag bit for an attribute has been set in the flags field of the device.
 
Methods inherited from class quicktime.util.QTHandleRef
copyFromArray, copyFromArray, copyFromArray, copyFromArray, copyFromArray, copyFromArray, copyFromArray, copyToArray, copyToArray, copyToArray, copyToArray, copyToArray, copyToArray, copyToArray, fromCompressionDialogState, fromSCSequence, getBytes, getSize, inMemory, isLocked, lock, lockHigh, moveHigh, toQTPointer, toQTPointer, toString, unlock
 
Methods inherited from class quicktime.QTObject
disposeQTObject, equals, ID
 
Methods inherited from class java.lang.Object
getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

fromSequenceGrabber

public static GDevice fromSequenceGrabber(SequenceGrabber sg)
                                   throws StdQTException
Returns the current device of the sequence grabber.

QuickTime::SGGetGWorld

Parameters:
sg - the SequenceGrabber object
Returns:
The current device of the sequence grabber.
See Also:
SequenceGrabber.getGWorldDevice()

get

public static GDevice get()
Returns the current graphic device.

QuickDraw::GetGDevice

Returns:
a graphics device

getList

public static GDevice getList()
Returns the first graphic device in the device list.

QuickDraw::GetDeviceList

Returns:
a graphics device

getMain

public static GDevice getMain()
Returns the graphic device for the main screen.

QuickDraw::GetMainDevice

Returns:
a graphics device

getMax

public static GDevice getMax(QDRect globalRect)
Returns the graphic device with the greatest pixel depth.

QuickDraw::GetMaxDevice

Parameters:
globalRect - a rectangle in global coordinates that intersects the devices you are searching
Returns:
a graphics device

init

public void init(int qdRefNum,
                 int mode)
Initialises the instance of the Graphics Device. If the device has a driver then the attributes will be set by this call, if not the attributes should be set with setAttributes as this call will do nothing. You should never need to call this method directly.

QuickDraw::InitGDevice

Parameters:
the - reference number of this GDevice
mode - the device configuration mode

setAttribute

public void setAttribute(int attribute,
                         boolean value)
Set the attributes of a graphics device.

QuickDraw::SetDeviceAttribute

Parameters:
attribute - use the constants
value - if true attribute is turned on

set

public void set()
Sets this GDevice as the current device.

QuickDraw::SetGDevice


getNext

public GDevice getNext()
Returns the graphic device that is the next device from this in the device list.

QuickDraw::GetNextDevice

Returns:
a graphics device

testAttribute

public boolean testAttribute(int attribute)
Determines whether the flag bit for an attribute has been set in the flags field of the device.

QuickDraw::TestDeviceAttribute

Parameters:
attribute - the attribute to test for
Returns:
true if the attribute is set otherwise false.

getPixMap

public PixMap getPixMap()
Returns the PixMap associated with this gDevice
Returns:
a PixMap for the GDevice

getBounds

public QDRect getBounds()
Returns the global Bounds associated with this gDevice
Returns:
a QDRect

hasScale

public float hasScale(int depth,
                      float scale)
               throws StdQTException
Returns the closest possible scaling that a particular screen device can be set to in a given pixel depth
Parameters:
depth - specifies the pixel depth of the screen device
scale - the desired scale value
Returns:
the closest scale available for the given depth

getScale

public float getScale()
               throws StdQTException
Returns the current scale of the screen graphics device
Returns:
the scale of the current device

getFlags

public int getFlags()
             throws StdQTException
Returns the current scale of the screen graphics device
Returns:
the flags of the current device

setScale

public void setScale(int scale,
                     int flags)
              throws StdQTException
Sets the current scale of the screen graphics device
Parameters:
scale - the desired scale value
the - flags to be used