1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
|
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE erlref SYSTEM "erlref.dtd">
<!-- THIS FILE IS GENERATED DO NOT EDIT -->
<erlref>
<header>
<copyright>
<year>2020</year>
<holder>wxWidgets team.</holder></copyright>
<legalnotice>Licensed under the wxWindows Free Documentation Licence, Version 3
</legalnotice>
<title>wxPen</title>
</header>
<module>wxPen</module>
<modulesummary>Functions for wxPen class</modulesummary>
<description><p>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.
</p><p>Note: On a monochrome display, wxWidgets shows all non-white pens as black.
</p><p> 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 <c>wxApp::OnInit()</c> (not implemented in wx) or when required.
</p><p>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 <c>wxPenList::FindOrCreatePen()</c> (not implemented in wx). See <c>wxPenList</c> (not implemented in wx) for more info.
</p><p>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.
</p><p>Predefined objects (include wx.hrl):
</p><p>See: <c>wxPenList</c> (not implemented in wx), <seeerl marker="wxDC"><c>wxDC</c></seeerl>, <seemfa marker="wxDC#setPen/2"><c>wxDC:setPen/2</c></seemfa>
</p>
<p>wxWidgets docs: <url href="https://docs.wxwidgets.org/3.1/classwx_pen.html">wxPen</url></p>
</description>
<datatypes><datatype><name name="wxPen"/></datatype></datatypes>
<funcs>
<func>
<name name="new" arity="0" clause_i="1" since=""/>
<fsummary>Default constructor. </fsummary>
<desc><p>Default constructor.
</p><p>The pen will be uninitialised, and <seemfa marker="#isOk/1"><c>isOk/1</c></seemfa> will return false.
</p></desc>
</func>
<func>
<name name="new" arity="1" clause_i="1" since=""/>
<name name="new" arity="1" clause_i="2" since=""/>
<fsummary>Copy constructor, uses overview_refcount. </fsummary>
<desc><p>Copy constructor, uses overview_refcount.
</p></desc>
</func>
<func>
<name name="new" arity="2" clause_i="1" since=""/>
<fsummary>Constructs a pen from a colour object, pen width and style. </fsummary>
<desc><p>Constructs a pen from a colour object, pen width and style.
</p><p>Remark: Different versions of Windows and different versions of other platforms support very different subsets of the styles above so handle with care.
</p><p>See: <seemfa marker="#setStyle/2"><c>setStyle/2</c></seemfa>, <seemfa marker="#setColour/4"><c>setColour/4</c></seemfa>, <seemfa marker="#setWidth/2"><c>setWidth/2</c></seemfa>
</p></desc>
</func>
<func>
<name name="destroy" arity="1" clause_i="1" since=""/>
<fsummary>Destructor. </fsummary>
<desc><p>Destructor.
</p><p>See: reference-counted object destruction
</p><p>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.
</p></desc>
</func>
<func>
<name name="getCap" arity="1" clause_i="1" since=""/>
<fsummary>Returns the pen cap style, which may be one of <c>wxCAP_ROUND</c>, <c>wxCAP_PROJECTING</c> and <c>wxCAP_BUTT</c>. </fsummary>
<desc><p>Returns the pen cap style, which may be one of <c>wxCAP_ROUND</c>, <c>wxCAP_PROJECTING</c> and <c>wxCAP_BUTT</c>.
</p><p>The default is <c>wxCAP_ROUND</c>.
</p><p>See: <seemfa marker="#setCap/2"><c>setCap/2</c></seemfa>
</p></desc>
</func>
<func>
<name name="getColour" arity="1" clause_i="1" since=""/>
<fsummary>Returns a reference to the pen colour. </fsummary>
<desc><p>Returns a reference to the pen colour.
</p><p>See: <seemfa marker="#setColour/4"><c>setColour/4</c></seemfa>
</p></desc>
</func>
<func>
<name name="getJoin" arity="1" clause_i="1" since=""/>
<fsummary>Returns the pen join style, which may be one of <c>wxJOIN_BEVEL</c>, <c>wxJOIN_ROUND</c> and <c>wxJOIN_MITER</c>. </fsummary>
<desc><p>Returns the pen join style, which may be one of <c>wxJOIN_BEVEL</c>, <c>wxJOIN_ROUND</c> and <c>wxJOIN_MITER</c>.
</p><p>The default is <c>wxJOIN_ROUND</c>.
</p><p>See: <seemfa marker="#setJoin/2"><c>setJoin/2</c></seemfa>
</p></desc>
</func>
<func>
<name name="getStyle" arity="1" clause_i="1" since=""/>
<fsummary>Returns the pen style. </fsummary>
<desc><p>Returns the pen style.
</p><p>See: <seemfa marker="#new/2"><c>new/2</c></seemfa>, <seemfa marker="#setStyle/2"><c>setStyle/2</c></seemfa>
</p></desc>
</func>
<func>
<name name="getWidth" arity="1" clause_i="1" since=""/>
<fsummary>Returns the pen width. </fsummary>
<desc><p>Returns the pen width.
</p><p>See: <seemfa marker="#setWidth/2"><c>setWidth/2</c></seemfa>
</p></desc>
</func>
<func>
<name name="isOk" arity="1" clause_i="1" since=""/>
<fsummary>Returns true if the pen is initialised. </fsummary>
<desc><p>Returns true if the pen is initialised.
</p><p>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.
</p></desc>
</func>
<func>
<name name="setCap" arity="2" clause_i="1" since=""/>
<fsummary>Sets the pen cap style, which may be one of <c>wxCAP_ROUND</c>, <c>wxCAP_PROJECTING</c> and <c>wxCAP_BUTT</c>. </fsummary>
<desc><p>Sets the pen cap style, which may be one of <c>wxCAP_ROUND</c>, <c>wxCAP_PROJECTING</c> and <c>wxCAP_BUTT</c>.
</p><p>The default is <c>wxCAP_ROUND</c>.
</p><p>See: <seemfa marker="#getCap/1"><c>getCap/1</c></seemfa>
</p></desc>
</func>
<func>
<name name="setColour" arity="2" clause_i="1" since=""/>
<fsummary>The pen's colour is changed to the given colour. </fsummary>
<desc><p>The pen's colour is changed to the given colour.
</p><p>See: <seemfa marker="#getColour/1"><c>getColour/1</c></seemfa>
</p></desc>
</func>
<func>
<name name="setColour" arity="4" clause_i="1" since=""/>
<fsummary/>
<desc/>
</func>
<func>
<name name="setJoin" arity="2" clause_i="1" since=""/>
<fsummary>Sets the pen join style, which may be one of <c>wxJOIN_BEVEL</c>, <c>wxJOIN_ROUND</c> and <c>wxJOIN_MITER</c>. </fsummary>
<desc><p>Sets the pen join style, which may be one of <c>wxJOIN_BEVEL</c>, <c>wxJOIN_ROUND</c> and <c>wxJOIN_MITER</c>.
</p><p>The default is <c>wxJOIN_ROUND</c>.
</p><p>See: <seemfa marker="#getJoin/1"><c>getJoin/1</c></seemfa>
</p></desc>
</func>
<func>
<name name="setStyle" arity="2" clause_i="1" since=""/>
<fsummary>Set the pen style. </fsummary>
<desc><p>Set the pen style.
</p><p>See: <seemfa marker="#new/2"><c>new/2</c></seemfa>
</p></desc>
</func>
<func>
<name name="setWidth" arity="2" clause_i="1" since=""/>
<fsummary>Sets the pen width. </fsummary>
<desc><p>Sets the pen width.
</p><p>See: <seemfa marker="#getWidth/1"><c>getWidth/1</c></seemfa>
</p></desc>
</func>
</funcs>
</erlref>
|