GDI maintains important internal data structures, but gives the driver access to the public fields of these structures by passing them down as user objects. User objects are intermediate data structures that provide an interface between GDI data structures and the drivers that need access to the information within these structures. The driver can pass the pointer to a user object back to GDI to query for information or to ask for various services. User objects with public fields provide the following advantages:
·They eliminate problems associated with direct access to internal GDI data structures.
·They provide a place to hold GDI data for the driver. For example, a PATHOBJ can hold all the extra data required to enumerate a complex object like a path.
The following user objects are available:
BRUSHOBJ | Defines the brush objects for graphic functions that output lines, text, or fills. Drivers can call BRUSHOBJ services to realize brushes or to find realizations previously cached by GDI. |
CLIPOBJ | Provides the driver with access to a clip region for drawing or filling. This region can be enumerated as a series of rectangles. |
FLOATOBJ | Allows graphics drivers to emulate floating point operations. Floating point operations are disabled for all other kernel-mode drivers. |
FONTOBJ | Gives the driver access to information about a particular instance (or realization) of a font. |
PALOBJ | A structure containing RGB palette colors; accessible via the PALOBJ_cGetColors and DrvSetPalette functions. |
PATHOBJ | Defines a path that specifies what is to be drawn (lines or Bezier curves). PATHOBJ is passed to the driver to describe a set of lines and Bezier curves that are to be stroked or filled. |
STROBJ | Enumerates a list of glyph handles and positions for the driver that describes how a text string is to be drawn. |
SURFOBJ | Identifies a surface, which can be a GDI bitmap, a device-dependent bitmap, or a device-managed surface. |
XFORMOBJ | Describes an arbitrary linear two-dimensional transform, such as for geometric wide lines. |
XLATEOBJ | Translates color indexes that refer to a source palette into indexes for a destination palette. The resulting destination indexes identify colors that match the surface color as closely as possible. |