xpen Class Reference

BASE CLASS FOR DEVICES CONTEXT PENS. More...

#include <Zclassut.h>

List of all members.

Public Member Functions

 xpen (int fnPenStyle=PS_SOLID, int nWidth=1, COLORREF crColor=RGB(0, 0, 0))
void Reset (void)
const HPEN Handle (void)

Detailed Description

BASE CLASS FOR DEVICES CONTEXT PENS.

Provides methods for manipulating WINDOWS GDI pens. A pen is a graphics tool that an application can use to draw lines and curves. Drawing applications use pens to draw freehand lines, straight lines, and curves. Computer-aided design (CAD) applications use pens to draw visible lines, hidden lines, section lines, center lines, and so on. Word processing and desktop publishing applications use pens to draw borders and rules. Spreadsheet applications use pens to designate trends in graphs and to outline bar graphs and pie charts.


Constructor & Destructor Documentation

xpen::xpen ( int  fnPenStyle = PS_SOLID,
int  nWidth = 1,
COLORREF  crColor = RGB ( 0, 0, 0 ) 
) [inline]

Creates a logical pen that has the specified style, width, and color. The pen can subsequently be selected into a device context and used to draw lines and curves.

Parameters:
fnPenStyle - Specifies the pen style. It can be any one of the following values:

  • PS_SOLID The pen is solid.
  • PS_DASH The pen is dashed. This style is valid only when the pen width is one or less in device units.
  • PS_DOT The pen is dotted. This style is valid only when the pen width is one or less in device units.
  • PS_DASHDOT The pen has alternating dashes and dots. This style is valid only when the pen width is one or less in device units.
  • PS_DASHDOTDOT The pen has alternating dashes and double dots. This style is valid only when the pen width is one or less in device units.
  • PS_NULL The pen is invisible.
  • PS_INSIDEFRAME The pen is solid. When this pen is used in any GDI drawing function that takes a bounding rectangle, the dimensions of the figure are shrunk so that it fits entirely in the bounding rectangle, taking into account the width of the pen. This applies only to geometric pens.
nWidth - Specifies the width of the pen, in logical units. If nWidth is zero, the pen is a single pixel wide, regardless of the current transformation. Creates a pen with the specified width bit with the PS_SOLID style if you specify a width greater than one for the following styles: PS_DASH, PS_DOT, PS_DASHDOT, PS_DASHDOTDOT.
crColor - Specifies a color reference for the pen color. To generate a COLORREF structure, use the RGB macro.

Member Function Documentation

const HPEN xpen::Handle ( void   )  [inline]

Returns the pen window handle.

void xpen::Reset ( void   )  [inline]

Restores the pen to the values members.


The documentation for this class was generated from the following file:

Generated on Sun Nov 29 07:22:16 2009 for Rad.on++ by  doxygen 1.6.1