.TH wxPen 3erl "wx 2.4.1" "wxWidgets team." "Erlang Module Definition" .SH NAME wxPen \- Functions for wxPen class .SH DESCRIPTION .LP A pen is a drawing tool for drawing outlines\&. It is used for drawing lines and painting the outline of rectangles, ellipses, etc\&. It has a colour, a width and a style\&. .LP Note: On a monochrome display, wxWidgets shows all non-white pens as black\&. .LP Do not initialize objects on the stack before the program commences, since other required structures may not have been set up yet\&. Instead, define global pointers to objects and create them in \fIwxApp::OnInit()\fR\& (not implemented in wx) or when required\&. .LP An application may wish to dynamically create pens with different characteristics, and there is the consequent danger that a large number of duplicate pens will be created\&. Therefore an application may wish to get a pointer to a pen by using the global list of pens ?wxThePenList, and calling the member function \fIwxPenList::FindOrCreatePen()\fR\& (not implemented in wx)\&. See \fIwxPenList\fR\& (not implemented in wx) for more info\&. .LP This class uses reference counting and copy-on-write internally so that assignments between two instances of this class are very cheap\&. You can therefore use actual objects instead of pointers without efficiency problems\&. If an instance of this class is changed it will create its own data internally so that other instances, which previously shared the data using the reference counting, are not affected\&. .LP Predefined objects (include wx\&.hrl): .LP See: \fIwxPenList\fR\& (not implemented in wx), \fIwxDC\fR\&, \fIwxDC:setPen/2\fR\& .LP wxWidgets docs: wxPen .SH DATA TYPES .nf \fBwxPen()\fR\& = wx:wx_object() .br .fi .SH EXPORTS .LP .nf .B new() -> wxPen() .br .fi .br .RS .LP Default constructor\&. .LP The pen will be uninitialised, and \fIisOk/1\fR\& will return false\&. .RE .LP .nf .B new(Colour) -> wxPen() .br .fi .br .nf .B new(Pen) -> wxPen() .br .fi .br .RS .LP Types: .RS 3 Pen = wxPen() .br .RE .RE .RS .LP Copy constructor, uses overview_refcount\&. .RE .LP .nf .B new(Colour, Options :: [Option]) -> wxPen() .br .fi .br .RS .LP Types: .RS 3 Colour = wx:wx_colour() .br Option = {width, integer()} | {style, wx:wx_enum()} .br .RE .RE .RS .LP Constructs a pen from a colour object, pen width and style\&. .LP Remark: Different versions of Windows and different versions of other platforms support very different subsets of the styles above so handle with care\&. .LP See: \fIsetStyle/2\fR\&, \fIsetColour/4\fR\&, \fIsetWidth/2\fR\& .RE .LP .nf .B destroy(This :: wxPen()) -> ok .br .fi .br .RS .LP Destructor\&. .LP See: reference-counted object destruction .LP Remark: Although all remaining pens are deleted when the application exits, the application should try to clean up all pens itself\&. This is because wxWidgets cannot know if a pointer to the pen object is stored in an application data structure, and there is a risk of double deletion\&. .RE .LP .nf .B getCap(This) -> wx:wx_enum() .br .fi .br .RS .LP Types: .RS 3 This = wxPen() .br .RE .RE .RS .LP Returns the pen cap style, which may be one of \fIwxCAP_ROUND\fR\&, \fIwxCAP_PROJECTING\fR\& and \fIwxCAP_BUTT\fR\&\&. .LP The default is \fIwxCAP_ROUND\fR\&\&. .LP See: \fIsetCap/2\fR\& .RE .LP .nf .B getColour(This) -> wx:wx_colour4() .br .fi .br .RS .LP Types: .RS 3 This = wxPen() .br .RE .RE .RS .LP Returns a reference to the pen colour\&. .LP See: \fIsetColour/4\fR\& .RE .LP .nf .B getJoin(This) -> wx:wx_enum() .br .fi .br .RS .LP Types: .RS 3 This = wxPen() .br .RE .RE .RS .LP Returns the pen join style, which may be one of \fIwxJOIN_BEVEL\fR\&, \fIwxJOIN_ROUND\fR\& and \fIwxJOIN_MITER\fR\&\&. .LP The default is \fIwxJOIN_ROUND\fR\&\&. .LP See: \fIsetJoin/2\fR\& .RE .LP .nf .B getStyle(This) -> wx:wx_enum() .br .fi .br .RS .LP Types: .RS 3 This = wxPen() .br .RE .RE .RS .LP Returns the pen style\&. .LP See: \fInew/2\fR\&, \fIsetStyle/2\fR\& .RE .LP .nf .B getWidth(This) -> integer() .br .fi .br .RS .LP Types: .RS 3 This = wxPen() .br .RE .RE .RS .LP Returns the pen width\&. .LP See: \fIsetWidth/2\fR\& .RE .LP .nf .B isOk(This) -> boolean() .br .fi .br .RS .LP Types: .RS 3 This = wxPen() .br .RE .RE .RS .LP Returns true if the pen is initialised\&. .LP Notice that an uninitialized pen object can\&'t be queried for any pen properties and all calls to the accessor methods on it will result in an assert failure\&. .RE .LP .nf .B setCap(This, CapStyle) -> ok .br .fi .br .RS .LP Types: .RS 3 This = wxPen() .br CapStyle = wx:wx_enum() .br .RE .RE .RS .LP Sets the pen cap style, which may be one of \fIwxCAP_ROUND\fR\&, \fIwxCAP_PROJECTING\fR\& and \fIwxCAP_BUTT\fR\&\&. .LP The default is \fIwxCAP_ROUND\fR\&\&. .LP See: \fIgetCap/1\fR\& .RE .LP .nf .B setColour(This, Colour) -> ok .br .fi .br .RS .LP Types: .RS 3 This = wxPen() .br Colour = wx:wx_colour() .br .RE .RE .RS .LP The pen\&'s colour is changed to the given colour\&. .LP See: \fIgetColour/1\fR\& .RE .LP .nf .B setColour(This, Red, Green, Blue) -> ok .br .fi .br .RS .LP Types: .RS 3 This = wxPen() .br Red = Green = Blue = integer() .br .RE .RE .RS .RE .LP .nf .B setJoin(This, Join_style) -> ok .br .fi .br .RS .LP Types: .RS 3 This = wxPen() .br Join_style = wx:wx_enum() .br .RE .RE .RS .LP Sets the pen join style, which may be one of \fIwxJOIN_BEVEL\fR\&, \fIwxJOIN_ROUND\fR\& and \fIwxJOIN_MITER\fR\&\&. .LP The default is \fIwxJOIN_ROUND\fR\&\&. .LP See: \fIgetJoin/1\fR\& .RE .LP .nf .B setStyle(This, Style) -> ok .br .fi .br .RS .LP Types: .RS 3 This = wxPen() .br Style = wx:wx_enum() .br .RE .RE .RS .LP Set the pen style\&. .LP See: \fInew/2\fR\& .RE .LP .nf .B setWidth(This, Width) -> ok .br .fi .br .RS .LP Types: .RS 3 This = wxPen() .br Width = integer() .br .RE .RE .RS .LP Sets the pen width\&. .LP See: \fIgetWidth/1\fR\& .RE