| Version: 3.2.8

Classes | Enumerations | Variables
pen.h File Reference

## Classes
class | wxPenInfo
| This class is a helper used for wxPen creation using named parameter idiom: it allows specifying various wxPen attributes using the chained calls to its clearly named methods instead of passing them in the fixed order to wxPen constructors. More...
class | wxPen
| A pen is a drawing tool for drawing outlines. More...
class | wxPenList
| There is only one instance of this class: wxThePenList. More...

## Enumerations
enum | wxPenStyle { wxPENSTYLE_INVALID = -1 , wxPENSTYLE_SOLID , wxPENSTYLE_DOT , wxPENSTYLE_LONG_DASH , wxPENSTYLE_SHORT_DASH , wxPENSTYLE_DOT_DASH , wxPENSTYLE_USER_DASH , wxPENSTYLE_TRANSPARENT , wxPENSTYLE_STIPPLE_MASK_OPAQUE , wxPENSTYLE_STIPPLE_MASK , wxPENSTYLE_STIPPLE , wxPENSTYLE_BDIAGONAL_HATCH , wxPENSTYLE_CROSSDIAG_HATCH , wxPENSTYLE_FDIAGONAL_HATCH , wxPENSTYLE_CROSS_HATCH , wxPENSTYLE_HORIZONTAL_HATCH , wxPENSTYLE_VERTICAL_HATCH , wxPENSTYLE_FIRST_HATCH , wxPENSTYLE_LAST_HATCH }
| The possible styles for a wxPen. More...
enum | wxPenQuality { wxPEN_QUALITY_DEFAULT , wxPEN_QUALITY_LOW , wxPEN_QUALITY_HIGH }
| Possible values for pen quality. More...
enum | wxPenJoin { wxJOIN_INVALID = -1 , wxJOIN_BEVEL = 120 , wxJOIN_MITER , wxJOIN_ROUND }
| The possible join values of a wxPen. More...
enum | wxPenCap { wxCAP_INVALID = -1 , wxCAP_ROUND = 130 , wxCAP_PROJECTING , wxCAP_BUTT }
| The possible cap values of a wxPen. More...

## Variables
wxPen | wxNullPen
| An empty pen. More...
wxPen * | wxRED_PEN
| Red pen. More...
wxPen * | wxBLUE_PEN
| Blue pen. More...
wxPen * | wxCYAN_PEN
| Cyan pen. More...
wxPen * | wxGREEN_PEN
| Green pen. More...
wxPen * | wxYELLOW_PEN
| Yellow pen. More...
wxPen * | wxBLACK_PEN
| Black pen. More...
wxPen * | wxWHITE_PEN
| White pen. More...
wxPen * | wxTRANSPARENT_PEN
| Transparent pen. More...
wxPen * | wxBLACK_DASHED_PEN
| Black dashed pen. More...
wxPen * | wxGREY_PEN
| Grey pen. More...
wxPen * | wxMEDIUM_GREY_PEN
| Medium-grey pen. More...
wxPen * | wxLIGHT_GREY_PEN
| Light-grey pen. More...
wxPenList * | wxThePenList
| The global list of wxPen objects ready to be re-used (for better performances). More...

## Enumeration Type Documentation

## ◆ wxPenCap

enum wxPenCap

The possible cap values of a wxPen.

Todo:
  use wxPENCAP_ prefix

Enumerator
wxCAP_INVALID |
wxCAP_ROUND |
wxCAP_PROJECTING |
wxCAP_BUTT |

## ◆ wxPenJoin

enum wxPenJoin

The possible join values of a wxPen.

Todo:
  use wxPENJOIN_ prefix

Enumerator
wxJOIN_INVALID |
wxJOIN_BEVEL |
wxJOIN_MITER |
wxJOIN_ROUND |

## ◆ wxPenQuality

enum wxPenQuality

Possible values for pen quality.

Pen quality is currently only used in wxMSW, the other ports ignore it and always use the same default pen quality.

In wxMSW the choice of quality affects whether "cosmetic" or "geometric" native pens are used in situations when both are usable. Notably, for dotted and dashed pens of width 1, high quality geometric pens are used by default since wxWidgets 3.1.4, while previous versions used lower quality but much faster cosmetic pens. If drawing performance is more important than the exact appearance of the lines drawn using this pen, low quality may be explicitly selected.

See wxPenInfo::Quality() and wxPen::SetQuality().

Since
  3.1.5

Enumerator
wxPEN_QUALITY_DEFAULT | Select the appropriate quality automatically.
wxPEN_QUALITY_LOW | Less good looking but faster.
wxPEN_QUALITY_HIGH | Best looking, at the expense of speed.

## ◆ wxPenStyle

enum wxPenStyle

The possible styles for a wxPen.

Note that hatched pen styles are not supported by X11-based ports, including wxGTK.

Enumerator
wxPENSTYLE_INVALID |
wxPENSTYLE_SOLID | Solid style.
wxPENSTYLE_DOT | Dotted style.
wxPENSTYLE_LONG_DASH | Long dashed style.
wxPENSTYLE_SHORT_DASH | Short dashed style.
wxPENSTYLE_DOT_DASH | Dot and dash style.
wxPENSTYLE_USER_DASH | Use the user dashes: see wxPen::SetDashes.
wxPENSTYLE_TRANSPARENT | No pen is used.
wxPENSTYLE_STIPPLE_MASK_OPAQUE | Todo: WHAT's this?
wxPENSTYLE_STIPPLE_MASK | Todo: WHAT's this?
wxPENSTYLE_STIPPLE | Use the stipple bitmap.
wxPENSTYLE_BDIAGONAL_HATCH | Backward diagonal hatch.
wxPENSTYLE_CROSSDIAG_HATCH | Cross-diagonal hatch.
wxPENSTYLE_FDIAGONAL_HATCH | Forward diagonal hatch.
wxPENSTYLE_CROSS_HATCH | Cross hatch.
wxPENSTYLE_HORIZONTAL_HATCH | Horizontal hatch.
wxPENSTYLE_VERTICAL_HATCH | Vertical hatch.
wxPENSTYLE_FIRST_HATCH | First of the hatch styles (inclusive).
wxPENSTYLE_LAST_HATCH | Last of the hatch styles (inclusive).

## Variable Documentation

## ◆ wxBLACK_DASHED_PEN

wxPen* wxBLACK_DASHED_PEN

Black dashed pen.

Except for the color and for the `wxPENSTYLE_SHORT_DASH` it has all standard attributes (1-pixel width, `wxCAP_ROUND` style, etc...).

## ◆ wxBLACK_PEN

wxPen* wxBLACK_PEN

Black pen.

Except for the color it has all standard attributes (1-pixel width, `wxPENSTYLE_SOLID` and `wxCAP_ROUND` styles, etc...).

## ◆ wxBLUE_PEN

wxPen* wxBLUE_PEN

Blue pen.

Except for the color it has all standard attributes (1-pixel width, `wxPENSTYLE_SOLID` and `wxCAP_ROUND` styles, etc...).

## ◆ wxCYAN_PEN

wxPen* wxCYAN_PEN

Cyan pen.

Except for the color it has all standard attributes (1-pixel width, `wxPENSTYLE_SOLID` and `wxCAP_ROUND` styles, etc...).

## ◆ wxGREEN_PEN

wxPen* wxGREEN_PEN

Green pen.

Except for the color it has all standard attributes (1-pixel width, `wxPENSTYLE_SOLID` and `wxCAP_ROUND` styles, etc...).

## ◆ wxGREY_PEN

wxPen* wxGREY_PEN

Grey pen.

Except for the color it has all standard attributes (1-pixel width, `wxPENSTYLE_SOLID` and `wxCAP_ROUND` styles, etc...).

## ◆ wxLIGHT_GREY_PEN

wxPen* wxLIGHT_GREY_PEN

Light-grey pen.

Except for the color it has all standard attributes (1-pixel width, `wxPENSTYLE_SOLID` and `wxCAP_ROUND` styles, etc...).

## ◆ wxMEDIUM_GREY_PEN

wxPen* wxMEDIUM_GREY_PEN

Medium-grey pen.

Except for the color it has all standard attributes (1-pixel width, `wxPENSTYLE_SOLID` and `wxCAP_ROUND` styles, etc...).

## ◆ wxNullPen

wxPen wxNullPen

An empty pen.

wxPen::IsOk() always returns false for this object.

## ◆ wxRED_PEN

wxPen* wxRED_PEN

Red pen.

Except for the color it has all standard attributes (1-pixel width, `wxPENSTYLE_SOLID` and `wxCAP_ROUND` styles, etc...).

## ◆ wxThePenList

wxPenList* wxThePenList

The global list of wxPen objects ready to be re-used (for better performances).

## ◆ wxTRANSPARENT_PEN

wxPen* wxTRANSPARENT_PEN

Transparent pen.

Except for the color it has all standard attributes (1-pixel width, `wxPENSTYLE_SOLID` and `wxCAP_ROUND` styles, etc...).

## ◆ wxWHITE_PEN

wxPen* wxWHITE_PEN

White pen.

Except for the color it has all standard attributes (1-pixel width, `wxPENSTYLE_SOLID` and `wxCAP_ROUND` styles, etc...).

## ◆ wxYELLOW_PEN

wxPen* wxYELLOW_PEN

Yellow pen.

Except for the color it has all standard attributes (1-pixel width, `wxPENSTYLE_SOLID` and `wxCAP_ROUND` styles, etc...).