diff -r 43e37759235e -r 51a74ef9ed63 Symbian3/SDK/Source/GUID-667E7F90-D6C2-55CE-AE60-6C938072FB9C.dita --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Symbian3/SDK/Source/GUID-667E7F90-D6C2-55CE-AE60-6C938072FB9C.dita Wed Mar 31 11:11:55 2010 +0100 @@ -0,0 +1,89 @@ + + + + + +Graphics +and Drawing OverviewThis topic provides an introduction to drawing graphics to the +screen. +

Variant: Both (ScreenPlay and non-ScreenPlay). Target +audience: Application developers.

+

Applications can draw to any RDrawableWindow —such as +an RWindow —via a graphics device, of type CWsScreenDevice, +and a graphics context, of type CWindowGc. These classes +are derived from the GDI +component classes CGraphicsDevice and CGraphicsContext, +respectively. This means that general drawing functions can be used for drawing +to windows, as well as to other graphics devices. The Window Server itself +does not provide the facilities to draw graphics to a physical device. CWindowGc functions +are not passed to the Window Server directly. Rather, they are stored in a +buffer maintained by the Window Server Client API. This buffer is flushed +to the Window Server only rarely. By this means the context switching involved +in drawing is minimised, and system performance significantly enhanced.

+

CWsScreenDeviceminimized encapsulates the device-dependent +aspects of graphics operations. Graphics functions are not carried out directly +via a CWsScreenDevice, however, but via a graphics context +with which it is associated. The graphics context class, CWindowGc, +provides a rich set of drawing functions, including functions to draw lines, +arcs, polygons, text and bitmaps.

+

A graphics context contains a collection of configurable parameters concerned +with graphics, such as pen width, pen color, brush color. It is stored in +the server, thus reducing the amount of information that has to be sent with +each graphics call. The graphics call simply specifies the graphics context +it wishes to use, and a single graphics context can be shared between multiple +windows.

+

To draw to a graphics context it must be associated with a window. Typically +a graphics context is created when a session is constructed, and that graphics +context is shared between several windows in the application. When the window +needs to use the graphics context it calls CWindowGc::Activate(). +If necessary it can change the graphics context's settings. CWindowGc::Deactivate() should +be called first if the graphics context is currently active upon another window.

+

Several optimizations are used by the Window Server to obtain high-performance +graphics:

+ +
+Graphics +and Drawing +The UI Control +Framework (CONE) +
\ No newline at end of file