LogicalPenExtended



This class defines the style, width and color of a logical pen.

class LogicalPenExtended
{
 public:
  unsigned Style;
  unsigned Width;
  unsigned Brush;
  Color Color;
  Handle Hatch;
  unsigned Entries;
  unsigned Array[1];

  unsigned& operator[](unsigned Index) {return Array[Index];}
};
Style The style of the graphics pen. This may be a combination of the values occurring in the enumeration PenStyle.
Width For geometric pens, the width of the pen in logical units. For cosmetic pens, the width must be 1.
Brush The style of the brush.
Color The color of the pen used by the brush.
Hatch If Brush is BrushPattern, Hatch is a handle to the bitmap that defines the pattern. If Brush is BrushSolid or BrushHollow, Hatch is ignored. If Brush is BrushPatternBitmap, Hatch is a handle to a packed device independent bitmap. To obtain this handle, an application calls the function AllocateGlobalMemory with GlobalMemoryFlag::Moveable (or AllocateLocalMemory LocalMemoryFlag::Moveable) to allocate a block of memory and then fills the memory with the packed device independent bitmap. A packed DIB consists of a BitmapInformation structure immediately followed by the array of bytes that define the pixels of the bitmap. If Brush is BrushPatternBitmapPointer, Hatch is a pointer to a packed DIB. The pointer derives from the memory block created by AllocateLocalMemory with LocalMemoryFixed or by AllocateGlobalMemory with GlobalMemoryFixed set, or it is the pointer returned by a call like LockLocalMemory. A packed DIB consists of a BitmapInformation structure immediately followed by the array of bytes that define the pixels of the bitmap. If Brush is BrushHatched, Hatch specifies the orientation of the lines used to create the hatch. It can be one of the following values.

Value Meaning
HatchDiagonalBack 45-degree upward hatch (left to right)
HatchCross Horizontal and vertical crosshatch
HatchDiagonalCross 45-degree crosshatch
HatchDiagonalForward 45-degree downward hatch (left to right)
HatchHorizontal Horizontal hatch
HatchVertical Vertical hatch

Entries The number of entries in the style array.
Array An array of custom styles for the brush.