See Also: OMXCreateVDS()
When you open a device, it is stored inside VDS and OMX uses this information to redirect the command to the screen, the printer or the PostScript generator.
Here is the architecture of OMX.
OMX
|
+------+------+
| | |
SCR PRN PSG
See Also: Registering a Device
See Also: What is a Device?, RegisterOMXDevice(), OMXRegister()
struct VDS_t
{
...
* ------------------------------------------------------------ *
* Device information *
* ------------------------------------------------------------ *
OMXDevice *psOutputDevice;
OMXNativeMethod *psNativeMethod;
...
};
The psNativeMethod structure contains all the pointer for a device's
set of function. The multiplexing is done using this information. In
the OMXDevice structure, we have the name of the device and a void
pointer. This pointer contains specific information for a particular
device.
struct OMXDevice_t
{
char *pszDeviceName;
void *psMisc;
};
typedef struct OMXDevice_t OMXDevice;
For an OMX point of view, this structure cannot be accessed. Only
the low level function should access this structure. eg: SCR store a
SCRScreenDev structure containing the SGLDisplay, the SGLWindow and
some other information specific to the screen.
See Also: OMXSetOrigin, OMXSetVecScale(), Scale in OMX
OMXRedraw() and OMXFlush().When you want to start a new drawing in the device you must reset it using the function OMXRedraw(). This function will clear the current output device and will put the raster in the background if needed.
After that, if you want to add new graphics to the current drawing, you can use all OMX drawing primitives.
When it is finished, you must send all changes to the output device. To do so, you must use OMXFlush(). In the case of a printing device, you must use it only at the end of the drawing process. For some other device like screen, it may be good to flush all graphical change sometime to show to the user that the system is working.
See Also: OMXRedraw(), OMXFlush()
Representation Scale: Defined to be in representation
units per pixel (eg: mm/pixel)
Vector Scale : Defined to be in vector units per
pixel (eg: m/pixel)
Raster Scale : Defined to be the pixel size per pixel
on the output device. (not used yet)
See Also: Coordinate system, OMXSetRepScale(), OMXSetVecScale(), OMXSetRasScale()