1SkIPoint16 Reference 2=== 3 4# <a name="IPoint16"></a> IPoint16 5 6## <a name="Overview"></a> Overview 7 8## <a name="Overview_Subtopic"></a> Overview Subtopic 9 10| name | description | 11| --- | --- | 12| <a href="#Constructor">Constructor</a> | functions that construct <a href="#SkIPoint16">SkIPoint16</a> | 13| <a href="#Member_Function">Member Function</a> | static functions and member methods | 14| <a href="#Member">Member</a> | member values | 15| <a href="#Related_Function">Related Function</a> | similar methods grouped together | 16 17# <a name="SkIPoint16"></a> Struct SkIPoint16 18<a href="#SkIPoint16">SkIPoint16</a> holds two 16 bit integer coordinates. 19 20## <a name="Related_Function"></a> Related Function 21 22| name | description | 23| --- | --- | 24| <a href="#Property">Property</a> | member values | 25| <a href="#Set">Set</a> | replaces all values | 26 27## <a name="Member_Function"></a> Member Function 28 29| name | description | 30| --- | --- | 31| <a href="#SkIPoint16_Make">Make</a> | constructs from integer inputs | 32| <a href="#SkIPoint16_set">set</a> | sets to integer input | 33| <a href="#SkIPoint16_x">x</a> | returns <a href="#SkIPoint16_fX">fX</a> | 34| <a href="#SkIPoint16_y">y</a> | returns <a href="#SkIPoint16_fY">fY</a> | 35 36## <a name="Member"></a> Member 37 38| name | description | 39| --- | --- | 40| <a href="#SkIPoint16_fX">fX</a> | x-axis value | 41| <a href="#SkIPoint16_fY">fY</a> | y-axis value | 42 43<a name="SkIPoint16_fX"> <code><strong>int16_t fX</strong></code> </a> 44 45x-axis value used by <a href="#IPoint16">IPoint16</a> 46 47<a name="SkIPoint16_fY"> <code><strong>int16_t fY</strong></code> </a> 48 49y-axis value used by <a href="#IPoint16">IPoint16</a> 50 51## <a name="Constructor"></a> Constructor 52 53| name | description | 54| --- | --- | 55| <a href="#SkIPoint16_Make">Make</a> | constructs from integer inputs | 56 57<a name="SkIPoint16_Make"></a> 58## Make 59 60<pre style="padding: 1em 1em 1em 1em;width: 62.5em; background-color: #f0f0f0"> 61static constexpr SkIPoint16 Make(int x, int y) 62</pre> 63 64Sets <a href="#SkIPoint16_fX">fX</a> to x, <a href="#SkIPoint16_fY">fY</a> to y. If SK_DEBUG is defined, asserts 65if x or y does not fit in 16 bits. 66 67### Parameters 68 69<table> <tr> <td><a name="SkIPoint16_Make_x"> <code><strong>x </strong></code> </a></td> <td> 70integer x-axis value of constructed <a href="SkIPoint_Reference#IPoint">IPoint</a></td> 71 </tr> <tr> <td><a name="SkIPoint16_Make_y"> <code><strong>y </strong></code> </a></td> <td> 72integer y-axis value of constructed <a href="SkIPoint_Reference#IPoint">IPoint</a></td> 73 </tr> 74</table> 75 76### Return Value 77 78<a href="#IPoint16">IPoint16</a> (x, y) 79 80### Example 81 82<div><fiddle-embed name="d815ca04fbf22b5acec6f85b6351f362"> 83 84#### Example Output 85 86~~~~ 87pt1.fX == pt2.fX 88pt1.fY == pt2.fY 89~~~~ 90 91</fiddle-embed></div> 92 93### See Also 94 95<a href="#SkIPoint16_set">set</a> <a href="SkPoint_Reference#SkPoint_iset">SkPoint::iset()</a><sup><a href="SkPoint_Reference#SkPoint_iset_2">[2]</a></sup> <a href="SkIPoint_Reference#SkIPoint_Make">SkIPoint::Make</a> 96 97--- 98 99## <a name="Property"></a> Property 100 101| name | description | 102| --- | --- | 103| <a href="#SkIPoint16_x">x</a> | returns <a href="#SkIPoint16_fX">fX</a> | 104| <a href="#SkIPoint16_y">y</a> | returns <a href="#SkIPoint16_fY">fY</a> | 105 106<a name="SkIPoint16_x"></a> 107## x 108 109<pre style="padding: 1em 1em 1em 1em;width: 62.5em; background-color: #f0f0f0"> 110int16_t x() const 111</pre> 112 113Returns x-axis value of <a href="#IPoint16">IPoint16</a>. 114 115### Return Value 116 117<a href="#SkIPoint16_fX">fX</a> 118 119### Example 120 121<div><fiddle-embed name="f7fd3b3674f042869de3582ab793dbf7"> 122 123#### Example Output 124 125~~~~ 126pt1.fX == pt1.x() 127~~~~ 128 129</fiddle-embed></div> 130 131### See Also 132 133<a href="#SkIPoint16_y">y</a> <a href="SkIPoint_Reference#SkIPoint_x">SkIPoint::x()</a> 134 135--- 136 137<a name="SkIPoint16_y"></a> 138## y 139 140<pre style="padding: 1em 1em 1em 1em;width: 62.5em; background-color: #f0f0f0"> 141int16_t y() const 142</pre> 143 144Returns y-axis value of <a href="SkIPoint_Reference#IPoint">IPoint</a>. 145 146### Return Value 147 148<a href="#SkIPoint16_fY">fY</a> 149 150### Example 151 152<div><fiddle-embed name="3662cedaf1e9924a401f794902da3b1f"> 153 154#### Example Output 155 156~~~~ 157pt1.fY == pt1.y() 158~~~~ 159 160</fiddle-embed></div> 161 162### See Also 163 164<a href="#SkIPoint16_x">x</a> <a href="SkPoint_Reference#SkPoint_y">SkPoint::y()</a> <a href="SkIPoint_Reference#SkIPoint_y">SkIPoint::y()</a> 165 166--- 167 168## <a name="Set"></a> Set 169 170| name | description | 171| --- | --- | 172| <a href="#SkIPoint16_set">set</a> | sets to integer input | 173 174<a name="SkIPoint16_set"></a> 175## set 176 177<pre style="padding: 1em 1em 1em 1em;width: 62.5em; background-color: #f0f0f0"> 178void set(int x, int y) 179</pre> 180 181Sets <a href="#SkIPoint16_fX">fX</a> to x and <a href="#SkIPoint16_fY">fY</a> to y. 182 183### Parameters 184 185<table> <tr> <td><a name="SkIPoint16_set_x"> <code><strong>x </strong></code> </a></td> <td> 186new value for <a href="#SkIPoint16_fX">fX</a></td> 187 </tr> <tr> <td><a name="SkIPoint16_set_y"> <code><strong>y </strong></code> </a></td> <td> 188new value for <a href="#SkIPoint16_fY">fY</a></td> 189 </tr> 190</table> 191 192### Example 193 194<div><fiddle-embed name="abff78d3f2d97b1284ccb13d0c56b6c8"> 195 196#### Example Output 197 198~~~~ 199pt1.fX == pt2.fX 200pt1.fY == pt2.fY 201~~~~ 202 203</fiddle-embed></div> 204 205### See Also 206 207<a href="#SkIPoint16_Make">Make</a> <a href="SkPoint_Reference#SkPoint_set">SkPoint::set</a> 208 209--- 210 211