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
|
<h1>SDLRectangle Class Reference</h1>
<h3>Section Contents</h3>
<ul>
<li><a href="#section--initWithX:y:width:height:">-initWithX:y:width:height:</a></li>
<li><a href="#section--initWithCGRect:">-initWithCGRect:</a></li>
<li><a href="#section-x">x</a></li>
<li><a href="#section-y">y</a></li>
<li><a href="#section-width">width</a></li>
<li><a href="#section-height">height</a></li>
</ul>
<h3>Overview</h3>
<p>Undocumented</p>
<section class="section task-group-section">
<h3 id="section--initWithX:y:width:height:">
-initWithX:y:width:height:
</h3>
<p>Create a Rectangle</p>
<h4>Objective-C</h4>
<pre class="highlight"><code><span class="k">-</span> <span class="p">(</span><span class="n">instancetype</span><span class="p">)</span><span class="nf">initWithX</span><span class="p">:(</span><span class="kt">float</span><span class="p">)</span><span class="nv">x</span>
<span class="nf">y</span><span class="p">:(</span><span class="kt">float</span><span class="p">)</span><span class="nv">y</span>
<span class="nf">width</span><span class="p">:(</span><span class="kt">float</span><span class="p">)</span><span class="nv">width</span>
<span class="nf">height</span><span class="p">:(</span><span class="kt">float</span><span class="p">)</span><span class="nv">height</span><span class="p">;</span></code></pre>
<h4>Swift</h4>
<pre class="highlight"><code><span class="nf">init</span><span class="o">!</span><span class="p">(</span><span class="nv">x</span><span class="p">:</span> <span class="kt">Float</span><span class="p">,</span> <span class="nv">y</span><span class="p">:</span> <span class="kt">Float</span><span class="p">,</span> <span class="nv">width</span><span class="p">:</span> <span class="kt">Float</span><span class="p">,</span> <span class="nv">height</span><span class="p">:</span> <span class="kt">Float</span><span class="p">)</span></code></pre>
<h4>Parameters</h4>
<dl>
<dt>x</dt>
<dd><p>The top-left x value</p></dd>
<dt>y</dt>
<dd><p>The top-left y value</p></dd>
<dt>width</dt>
<dd><p>The width</p></dd>
<dt>height</dt>
<dd><p>The height</p></dd>
</dl>
<div>
<h4>Return Value</h4>
<p>An new SDLRectangle object</p>
</div>
<h3 id="section--initWithCGRect:">
-initWithCGRect:
</h3>
<p>Create a Rectangle from a CGRect</p>
<h4>Objective-C</h4>
<pre class="highlight"><code><span class="k">-</span> <span class="p">(</span><span class="n">instancetype</span><span class="p">)</span><span class="nf">initWithCGRect</span><span class="p">:(</span><span class="n">CGRect</span><span class="p">)</span><span class="nv">rect</span><span class="p">;</span></code></pre>
<h4>Swift</h4>
<pre class="highlight"><code><span class="nf">init</span><span class="o">!</span><span class="p">(</span><span class="n">cgRect</span> <span class="nv">rect</span><span class="p">:</span> <span class="kt">Any</span><span class="o">!</span><span class="p">)</span></code></pre>
<h4>Parameters</h4>
<dl>
<dt>rect</dt>
<dd><p>The rectangle to use</p></dd>
</dl>
<div>
<h4>Return Value</h4>
<p>An new SDLRectangle object</p>
</div>
<h3 id="section-x">
x
</h3>
<p>The X-coordinate of the user control
Required, Float</p>
<h4>Objective-C</h4>
<pre class="highlight"><code><span class="k">@property</span> <span class="p">(</span><span class="n">readwrite</span><span class="p">,</span> <span class="n">strong</span><span class="p">,</span> <span class="n">nonatomic</span><span class="p">)</span> <span class="n">NSNumber</span><span class="o"><</span><span class="n"><a href="../Protocols.html#/c:objc(pl)SDLFloat">SDLFloat</a></span><span class="o">></span> <span class="o">*</span><span class="n">x</span><span class="p">;</span></code></pre>
<h3 id="section-y">
y
</h3>
<p>The Y-coordinate of the user control
Required, Float</p>
<h4>Objective-C</h4>
<pre class="highlight"><code><span class="k">@property</span> <span class="p">(</span><span class="n">readwrite</span><span class="p">,</span> <span class="n">strong</span><span class="p">,</span> <span class="n">nonatomic</span><span class="p">)</span> <span class="n">NSNumber</span><span class="o"><</span><span class="n"><a href="../Protocols.html#/c:objc(pl)SDLFloat">SDLFloat</a></span><span class="o">></span> <span class="o">*</span><span class="n">y</span><span class="p">;</span></code></pre>
<h3 id="section-width">
width
</h3>
<p>The width of the user control’s bounding rectangle
Required, Float</p>
<h4>Objective-C</h4>
<pre class="highlight"><code><span class="k">@property</span> <span class="p">(</span><span class="n">readwrite</span><span class="p">,</span> <span class="n">strong</span><span class="p">,</span> <span class="n">nonatomic</span><span class="p">)</span> <span class="n">NSNumber</span><span class="o"><</span><span class="n"><a href="../Protocols.html#/c:objc(pl)SDLFloat">SDLFloat</a></span><span class="o">></span> <span class="o">*</span><span class="n">width</span><span class="p">;</span></code></pre>
<h3 id="section-height">
height
</h3>
<p>The height of the user control’s bounding rectangle
Required, Float</p>
<h4>Objective-C</h4>
<pre class="highlight"><code><span class="k">@property</span> <span class="p">(</span><span class="n">readwrite</span><span class="p">,</span> <span class="n">strong</span><span class="p">,</span> <span class="n">nonatomic</span><span class="p">)</span> <span class="n">NSNumber</span><span class="o"><</span><span class="n"><a href="../Protocols.html#/c:objc(pl)SDLFloat">SDLFloat</a></span><span class="o">></span> <span class="o">*</span><span class="n">height</span><span class="p">;</span></code></pre>
</section>
|