Version: 3.1.5
wxPenInfo Class Reference

#include <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));
Since
3.1.1

Public Member Functions

 wxPenInfo (const wxColour &colour=wxColour(), int width=1, wxPenStyle style=wxPENSTYLE_SOLID)
 
wxPenInfoColour (const wxColour &col)
 
wxPenInfoWidth (int width)
 
wxPenInfoStyle (wxPenStyle style)
 
wxPenInfoStipple (const wxBitmap &stipple)
 
wxPenInfoDashes (int nb_dashes, const wxDash *dash)
 
wxPenInfoJoin (wxPenJoin join)
 
wxPenInfoCap (wxPenCap cap)
 
wxPenInfoQuality (wxPenQuality quality)
 Set the pen quality. More...
 
wxPenInfoLowQuality ()
 Set low pen quality. More...
 
wxPenInfoHighQuality ()
 Set high pen quality. More...
 
wxPenInfoLowQuality ()
 
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 ( const wxColour colour = wxColour(),
int  width = 1,
wxPenStyle  style = wxPENSTYLE_SOLID 
)
explicit

Member Function Documentation

wxPenInfo& wxPenInfo::Cap ( wxPenCap  cap)
wxPenInfo& wxPenInfo::Colour ( const wxColour col)
wxPenInfo& wxPenInfo::Dashes ( int  nb_dashes,
const wxDash *  dash 
)
wxPenCap wxPenInfo::GetCap ( ) const
wxColour wxPenInfo::GetColour ( ) const
wxDash* wxPenInfo::GetDash ( ) const
int wxPenInfo::GetDashCount ( ) const
int wxPenInfo::GetDashes ( wxDash **  ptr)
wxPenJoin wxPenInfo::GetJoin ( ) const
wxPenQuality wxPenInfo::GetQuality ( ) const
wxBitmap wxPenInfo::GetStipple ( ) const
wxPenStyle wxPenInfo::GetStyle ( ) const
int wxPenInfo::GetWidth ( ) const
wxPenInfo& wxPenInfo::HighQuality ( )

Set high pen quality.

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

Since
3.1.5
bool wxPenInfo::IsTransparent ( ) const
wxPenInfo& wxPenInfo::Join ( wxPenJoin  join)
wxPenInfo& wxPenInfo::LowQuality ( )

Set low pen quality.

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

Since
3.1.5
wxPenInfo& wxPenInfo::LowQuality ( )
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
wxPenInfo& wxPenInfo::Stipple ( const wxBitmap stipple)
wxPenInfo& wxPenInfo::Style ( wxPenStyle  style)
wxPenInfo& wxPenInfo::Width ( int  width)