1wxPen(3)                   Erlang Module Definition                   wxPen(3)
2
3
4

NAME

6       wxPen - Functions for wxPen class
7

DESCRIPTION

9       A  pen  is  a drawing tool for drawing outlines. It is used for drawing
10       lines and painting the outline of rectangles, ellipses, etc. It  has  a
11       colour, a width and a style.
12
13       Note:  On  a  monochrome display, wxWidgets shows all non-white pens as
14       black.
15
16       Do not initialize objects on the stack before  the  program  commences,
17       since  other required structures may not have been set up yet. Instead,
18       define global pointers to objects and create  them  in  wxApp::OnInit()
19       (not implemented in wx) or when required.
20
21       An application may wish to dynamically create pens with different char‐
22       acteristics, and there is the consequent danger that a large number  of
23       duplicate  pens  will  be created. Therefore an application may wish to
24       get a pointer to a pen by using the global list of pens  ?wxThePenList,
25       and  calling  the member function wxPenList::FindOrCreatePen() (not im‐
26       plemented in wx). See wxPenList (not implemented in wx) for more info.
27
28       This class uses reference counting and copy-on-write internally so that
29       assignments between two instances of this class are very cheap. You can
30       therefore use actual objects instead  of  pointers  without  efficiency
31       problems.  If  an  instance of this class is changed it will create its
32       own data internally so that other instances,  which  previously  shared
33       the data using the reference counting, are not affected.
34
35       Predefined objects (include wx.hrl):
36
37       See: wxPenList (not implemented in wx), wxDC, wxDC:setPen/2
38
39       wxWidgets docs: wxPen
40

DATA TYPES

42       wxPen() = wx:wx_object()
43

EXPORTS

45       new() -> wxPen()
46
47              Default constructor.
48
49              The pen will be uninitialised, and isOk/1 will return false.
50
51       new(Colour) -> wxPen()
52
53       new(Pen) -> wxPen()
54
55              Types:
56
57                 Pen = wxPen()
58
59              Copy constructor, uses overview_refcount.
60
61       new(Colour, Options :: [Option]) -> wxPen()
62
63              Types:
64
65                 Colour = wx:wx_colour()
66                 Option = {width, integer()} | {style, wx:wx_enum()}
67
68              Constructs a pen from a colour object, pen width and style.
69
70              Remark:  Different versions of Windows and different versions of
71              other platforms support very different  subsets  of  the  styles
72              above so handle with care.
73
74              See: setStyle/2, setColour/4, setWidth/2
75
76       destroy(This :: wxPen()) -> ok
77
78              Destructor.
79
80              See: reference-counted object destruction
81
82              Remark:  Although all remaining pens are deleted when the appli‐
83              cation exits, the application should try to clean  up  all  pens
84              itself.  This  is  because wxWidgets cannot know if a pointer to
85              the pen object is stored in an application data  structure,  and
86              there is a risk of double deletion.
87
88       getCap(This) -> wx:wx_enum()
89
90              Types:
91
92                 This = wxPen()
93
94              Returns  the pen cap style, which may be one of wxCAP_ROUND, wx‐
95              CAP_PROJECTING and wxCAP_BUTT.
96
97              The default is wxCAP_ROUND.
98
99              See: setCap/2
100
101       getColour(This) -> wx:wx_colour4()
102
103              Types:
104
105                 This = wxPen()
106
107              Returns a reference to the pen colour.
108
109              See: setColour/4
110
111       getJoin(This) -> wx:wx_enum()
112
113              Types:
114
115                 This = wxPen()
116
117              Returns the pen join style, which may be  one  of  wxJOIN_BEVEL,
118              wxJOIN_ROUND and wxJOIN_MITER.
119
120              The default is wxJOIN_ROUND.
121
122              See: setJoin/2
123
124       getStyle(This) -> wx:wx_enum()
125
126              Types:
127
128                 This = wxPen()
129
130              Returns the pen style.
131
132              See: new/2, setStyle/2
133
134       getWidth(This) -> integer()
135
136              Types:
137
138                 This = wxPen()
139
140              Returns the pen width.
141
142              See: setWidth/2
143
144       isOk(This) -> boolean()
145
146              Types:
147
148                 This = wxPen()
149
150              Returns true if the pen is initialised.
151
152              Notice that an uninitialized pen object can't be queried for any
153              pen properties and all calls to the accessor methods on it  will
154              result in an assert failure.
155
156       setCap(This, CapStyle) -> ok
157
158              Types:
159
160                 This = wxPen()
161                 CapStyle = wx:wx_enum()
162
163              Sets  the  pen  cap  style, which may be one of wxCAP_ROUND, wx‐
164              CAP_PROJECTING and wxCAP_BUTT.
165
166              The default is wxCAP_ROUND.
167
168              See: getCap/1
169
170       setColour(This, Colour) -> ok
171
172              Types:
173
174                 This = wxPen()
175                 Colour = wx:wx_colour()
176
177              The pen's colour is changed to the given colour.
178
179              See: getColour/1
180
181       setColour(This, Red, Green, Blue) -> ok
182
183              Types:
184
185                 This = wxPen()
186                 Red = Green = Blue = integer()
187
188       setJoin(This, Join_style) -> ok
189
190              Types:
191
192                 This = wxPen()
193                 Join_style = wx:wx_enum()
194
195              Sets the pen join style,  which  may  be  one  of  wxJOIN_BEVEL,
196              wxJOIN_ROUND and wxJOIN_MITER.
197
198              The default is wxJOIN_ROUND.
199
200              See: getJoin/1
201
202       setStyle(This, Style) -> ok
203
204              Types:
205
206                 This = wxPen()
207                 Style = wx:wx_enum()
208
209              Set the pen style.
210
211              See: new/2
212
213       setWidth(This, Width) -> ok
214
215              Types:
216
217                 This = wxPen()
218                 Width = integer()
219
220              Sets the pen width.
221
222              See: getWidth/1
223
224
225
226wxWidgets team.                    wx 2.2.1                           wxPen(3)
Impressum