Share via


GDI User Objects

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 structure can hold all the extra data required to enumerate a complex object like a path.

The following user objects are available:

Object Description

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 structure contains no public members.

PATHOBJ

Defines a path that specifies what is to be drawn (lines or Bezier curves). A PATHOBJ structure is passed to the driver to describe a set of lines and Bezier curves that are to be stroked or filled.

STROBJ

Enumerates for the driver a list of glyph handles and positions that describe 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. See Surface Types for more information.

XFORMOBJ

Describes an arbitrary linear two-dimensional transform, such as for geometric wide lines.

XLATEOBJ

Defines the translations needed to convert pixels from the source surface format to the destination surface format.