| Version: 3.1.5

Public Member Functions | List of all members
wxPenInfo Class Reference

`#include </home/Hamis/wxwidgets-3.1/wxWidgets3.1-3.1.5-1.i686/src/wxWidgets-3.1.5/interface/wx/pen.h>`

## Detailed Description

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.

For instance, to create a dotted blue pen with the given join style you could do

wxPen pen(wxPenInfo(*wxBLUE).Style(wxPENSTYLE_DOT).Join(wxJOIN_BEVEL));
wxPen
A pen is a drawing tool for drawing outlines.
Definition: pen.h:260
wxPenInfo::wxPenInfo
wxPenInfo(const wxColour &colour=wxColour(), int width=1, wxPenStyle style=wxPENSTYLE_SOLID)
wxJOIN_BEVEL
@ wxJOIN_BEVEL
Definition: pen.h:107
wxPENSTYLE_DOT
@ wxPENSTYLE_DOT
Dotted style.
Definition: pen.h:21

Since
  3.1.1

## Public Member Functions
| wxPenInfo (const wxColour &colour=wxColour(), int width=1, wxPenStyle style=wxPENSTYLE_SOLID)
wxPenInfo & | Colour (const wxColour &col)
wxPenInfo & | Width (int width)
wxPenInfo & | Style (wxPenStyle style)
wxPenInfo & | Stipple (const wxBitmap &stipple)
wxPenInfo & | Dashes (int nb_dashes, const wxDash *dash)
wxPenInfo & | Join (wxPenJoin join)
wxPenInfo & | Cap (wxPenCap cap)
wxPenInfo & | Quality (wxPenQuality quality)
| Set the pen quality. More...
wxPenInfo & | LowQuality ()
| Set low pen quality. More...
wxPenInfo & | HighQuality ()
| Set high pen quality. More...
wxPenInfo & | LowQuality ()
wxColour | GetColour () const
wxBitmap | GetStipple () const
wxPenStyle | GetStyle () const
wxPenJoin | GetJoin () const
wxPenCap | GetCap () const
wxPenQuality | GetQuality () const
int | GetDashes (wxDash **ptr)
int | GetDashCount () const
wxDash * | GetDash () const
bool | IsTransparent () const
int | GetWidth () const

## Constructor & Destructor Documentation

## ◆ wxPenInfo()

wxPenInfo::wxPenInfo | ( | const wxColour & | colour = `wxColour()`,
|  | int | width = `1`,
|  | wxPenStyle | style = `wxPENSTYLE_SOLID`
| ) |  |
| explicit

## Member Function Documentation

## ◆ Cap()

wxPenInfo & wxPenInfo::Cap | ( | wxPenCap | cap | ) |

## ◆ Colour()

wxPenInfo & wxPenInfo::Colour | ( | const wxColour & | col | ) |

## ◆ Dashes()

wxPenInfo & wxPenInfo::Dashes | ( | int | nb_dashes,
|  | const wxDash * | dash
| ) |  |

## ◆ GetCap()

wxPenCap wxPenInfo::GetCap | ( |  | ) | const

## ◆ GetColour()

wxColour wxPenInfo::GetColour | ( |  | ) | const

## ◆ GetDash()

wxDash * wxPenInfo::GetDash | ( |  | ) | const

## ◆ GetDashCount()

int wxPenInfo::GetDashCount | ( |  | ) | const

## ◆ GetDashes()

int wxPenInfo::GetDashes | ( | wxDash ** | ptr | ) |

## ◆ GetJoin()

wxPenJoin wxPenInfo::GetJoin | ( |  | ) | const

## ◆ GetQuality()

wxPenQuality wxPenInfo::GetQuality | ( |  | ) | const

## ◆ GetStipple()

wxBitmap wxPenInfo::GetStipple | ( |  | ) | const

## ◆ GetStyle()

wxPenStyle wxPenInfo::GetStyle | ( |  | ) | const

## ◆ GetWidth()

int wxPenInfo::GetWidth | ( |  | ) | const

## ◆ HighQuality()

wxPenInfo & wxPenInfo::HighQuality | ( |  | ) |

Set high pen quality.

This is the same as calling Quality() with wxPEN_QUALITY_HIGH.

Since
  3.1.5

## ◆ IsTransparent()

bool wxPenInfo::IsTransparent | ( |  | ) | const

## ◆ Join()

wxPenInfo & wxPenInfo::Join | ( | wxPenJoin | join | ) |

## ◆ LowQuality() [1/2]

wxPenInfo & wxPenInfo::LowQuality | ( |  | ) |

Set low pen quality.

This is the same as calling Quality() with wxPEN_QUALITY_LOW.

Since
  3.1.5

## ◆ LowQuality() [2/2]

wxPenInfo & wxPenInfo::LowQuality | ( |  | ) |

## ◆ Quality()

wxPenInfo & wxPenInfo::Quality | ( | wxPenQuality | quality | ) |

Set the pen quality.

Using LowQuality() or HighQuality() is usually more convenient.

See also
  wxPen::SetQuality()

Since
  3.1.5

## ◆ Stipple()

wxPenInfo & wxPenInfo::Stipple | ( | const wxBitmap & | stipple | ) |

## ◆ Style()

wxPenInfo & wxPenInfo::Style | ( | wxPenStyle | style | ) |

## ◆ Width()

wxPenInfo & wxPenInfo::Width | ( | int | width | ) |