Version: 3.1.6
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...
 
wxPenwxRED_PEN
 Red pen. More...
 
wxPenwxBLUE_PEN
 Blue pen. More...
 
wxPenwxCYAN_PEN
 Cyan pen. More...
 
wxPenwxGREEN_PEN
 Green pen. More...
 
wxPenwxYELLOW_PEN
 Yellow pen. More...
 
wxPenwxBLACK_PEN
 Black pen. More...
 
wxPenwxWHITE_PEN
 White pen. More...
 
wxPenwxTRANSPARENT_PEN
 Transparent pen. More...
 
wxPenwxBLACK_DASHED_PEN
 Black dashed pen. More...
 
wxPenwxGREY_PEN
 Grey pen. More...
 
wxPenwxMEDIUM_GREY_PEN
 Medium-grey pen. More...
 
wxPenwxLIGHT_GREY_PEN
 Light-grey pen. More...
 
wxPenListwxThePenList
 The global list of wxPen objects ready to be re-used (for better performances). More...
 

Enumeration Type Documentation

enum wxPenCap

The possible cap values of a wxPen.

Todo:
use wxPENCAP_ prefix
Enumerator
wxCAP_INVALID 
wxCAP_ROUND 
wxCAP_PROJECTING 
wxCAP_BUTT 
enum wxPenJoin

The possible join values of a wxPen.

Todo:
use wxPENJOIN_ prefix
Enumerator
wxJOIN_INVALID 
wxJOIN_BEVEL 
wxJOIN_MITER 
wxJOIN_ROUND 

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.

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

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...).

wxPen* wxBLACK_PEN

Black pen.

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

wxPen* wxBLUE_PEN

Blue pen.

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

wxPen* wxCYAN_PEN

Cyan pen.

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

wxPen* wxGREEN_PEN

Green pen.

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

wxPen* wxGREY_PEN

Grey pen.

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

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...).

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...).

wxPen wxNullPen

An empty pen.

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

wxPen* wxRED_PEN

Red pen.

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

wxPenList* wxThePenList

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

wxPen* wxTRANSPARENT_PEN

Transparent pen.

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

wxPen* wxWHITE_PEN

White pen.

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

wxPen* wxYELLOW_PEN

Yellow pen.

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