Graphics Class Properties
The Graphics class provides a long list of properties (see Table 3.1) and methods. We will discuss and use these properties and methods in this and following chapters.
Property |
Description |
---|---|
Clip |
Gets and sets a Region type that limits the drawing region of the Graphics object. |
ClipBounds |
Returns a RectangleF structure that bounds the clipping region of this Graphics object. Supports read-only access. |
CompositingMode |
Returns a value of type CompositingMode enumeration representing how composite images are drawn to the Graphics object. |
CompositingQuality |
Gets and sets the rendering quality (directly proportional to the visual quality of the output and inversely proportional to the rendering time) of composite images, represented by the CompositingQuality enumeration. |
DpiX |
Returns the horizontal resolution (dots per inch) of a Graphics object. |
DpiY |
Returns the vertical resolution (dots per inch) of a Graphics object. |
InterpolationMode |
Gets and sets the interpolation mode (which determines intermediate values between two endpoints), represented by the InterpolationMode enumerator. |
IsClipEmpty |
Returns a value indicating whether the clipping region of a Graphics object is empty. When there is no clipping, this property returns false. |
IsVisibleClipEmpty |
Returns a value indicating whether the visible clipping region of a Graphics object is empty. |
PageScale |
Gets and sets a value for scaling between world units and page units for this Graphics object. |
PageUnit |
Gets and sets a value that represents the unit of measure for page coordinates. |
PixelOffsetMode |
Gets and sets a value for the pixel offset mode (PixelOffsetMode enumeration). |
RenderingOrigin |
Represents the rendering origin of a Graphics object for dithering and hatch brushes. |
SmoothingMode |
Gets and sets the smoothing mode of a Graphics object (SmoothingMode enumeration). Does not affect text. Smoothing modes include high quality, high speed, and anti-aliasing. |
TextContrast |
Gets and sets the gamma correction value for rendering anti-aliased and ClearType text values, ranging from 0 to 12. The default is 4. |
TextRenderingHint |
Gets and sets the text rendering quality (TextRenderingHint enumeration). Affects only text drawn on the Graphics object. |
Transform |
Gets and sets the world transformation matrix (transformation is the process of converting graphics objects from one state to another). The transformation state is represented by a transformation matrix. |
VisibleClipBounds |
Gets and sets the visible clipping region of the Graphics object (the intersection of the clipping region of the Graphics object and the clipping region of the window). |