diff -r 80ef3a206772 -r 48780e181b38 Symbian3/SDK/Source/GUID-067BC702-4F66-5CAF-952D-7CFA35F5EB1E.dita --- a/Symbian3/SDK/Source/GUID-067BC702-4F66-5CAF-952D-7CFA35F5EB1E.dita Fri Jul 16 17:23:46 2010 +0100 +++ b/Symbian3/SDK/Source/GUID-067BC702-4F66-5CAF-952D-7CFA35F5EB1E.dita Tue Jul 20 12:00:49 2010 +0100 @@ -9,5 +9,5 @@ --> -Twip to Pixel Mapping

This topic provides an introduction to two classes that embody the important GUI features of device independence and the ability to zoom.

Two desirable facilities of a GUI are:

These two facilities are embodied in the two classes MGraphicsDeviceMap and TZoomFactor.

Device independence is facilitated by storing drawings and text in device-independent form and then converting the device-independent units (twips) into device-dependent units (pixels) for different devices such as screens and printers. The conversion interface is MGraphicsDeviceMap, and it is implemented by graphics devices.

TZoomFactor also implements this interface. It takes a mapping between twips and pixels, and then also applies a zooming factor: the larger the zooming factor, the more pixels per twip. The relationship between the classes is shown below:

Note that TZoomFactor not only implements MGraphicsDeviceMap but also uses it. The point is that the MGraphicsDeviceMap -supporting object used can either be a graphics device, or another TZoomFactor. This allows zooming to be applied to an already zoomed mapping.

Using TZoomFactor and +Twip to Pixel Mapping

This topic provides an introduction to two classes that embody the important GUI features of device independence and the ability to zoom.

Two desirable facilities of a GUI are:

  • device independence

  • zooming to reveal greater levels of detail or, conversely, more of a document

These two facilities are embodied in the two classes MGraphicsDeviceMap and TZoomFactor.

Device independence is facilitated by storing drawings and text in device-independent form and then converting the device-independent units (twips) into device-dependent units (pixels) for different devices such as screens and printers. The conversion interface is MGraphicsDeviceMap, and it is implemented by graphics devices.

TZoomFactor also implements this interface. It takes a mapping between twips and pixels, and then also applies a zooming factor: the larger the zooming factor, the more pixels per twip. The relationship between the classes is shown below:

Note that TZoomFactor not only implements MGraphicsDeviceMap but also uses it. The point is that the MGraphicsDeviceMap -supporting object used can either be a graphics device, or another TZoomFactor. This allows zooming to be applied to an already zoomed mapping.

Using TZoomFactor and MGraphicsDeviceMap Graphics Device Interface Concepts
\ No newline at end of file