Home | History | Annotate | Download | only in api
      1 SkIPoint Reference
      2 ===
      3 
      4 
      5 <a name='SkIPoint'></a>
      6 
      7 ---
      8 
      9 <pre style="padding: 1em 1em 1em 1em;width: 62.5em; background-color: #f0f0f0">
     10 struct <a href='SkIPoint_Reference#SkIPoint'>SkIPoint</a> {
     11 
     12     int32_t <a href='#SkIPoint_fX'>fX</a>;
     13     int32_t <a href='#SkIPoint_fY'>fY</a>;
     14 
     15     static constexpr <a href='SkIPoint_Reference#SkIPoint'>SkIPoint</a> <a href='#SkIPoint_Make'>Make</a>(int32_t x, int32_t y);
     16     int32_t <a href='#SkIPoint_x'>x()</a> const;
     17     int32_t <a href='#SkIPoint_y'>y()</a> const;
     18     bool <a href='#SkIPoint_isZero'>isZero</a>() const;
     19     void <a href='#SkIPoint_set'>set</a>(int32_t x, int32_t y);
     20     <a href='SkIPoint_Reference#SkIPoint'>SkIPoint</a> operator-() const;
     21     void <a href='#SkIPoint_addto_operator'>operator+=</a>(const <a href='SkIPoint_Reference#SkIVector'>SkIVector</a>& v);
     22     void <a href='#SkIPoint_subtractfrom_operator'>operator-=</a>(const <a href='SkIPoint_Reference#SkIVector'>SkIVector</a>& v);
     23     bool <a href='#SkIPoint_equals'>equals</a>(int32_t x, int32_t y) const;
     24     friend bool <a href='#SkIPoint_equal_operator'>operator==</a>(const <a href='SkIPoint_Reference#SkIPoint'>SkIPoint</a>& a, const <a href='SkIPoint_Reference#SkIPoint'>SkIPoint</a>& b);
     25     friend bool <a href='#SkIPoint_notequal_operator'>operator!=</a>(const <a href='SkIPoint_Reference#SkIPoint'>SkIPoint</a>& a, const <a href='SkIPoint_Reference#SkIPoint'>SkIPoint</a>& b);
     26     friend <a href='SkIPoint_Reference#SkIVector'>SkIVector</a> <a href='#SkIPoint_subtract_operator'>operator-</a>(const <a href='SkIPoint_Reference#SkIPoint'>SkIPoint</a>& a, const <a href='SkIPoint_Reference#SkIPoint'>SkIPoint</a>& b);
     27     friend <a href='SkIPoint_Reference#SkIPoint'>SkIPoint</a> <a href='#SkIPoint_add_operator'>operator+</a>(const <a href='SkIPoint_Reference#SkIPoint'>SkIPoint</a>& a, const <a href='SkIPoint_Reference#SkIVector'>SkIVector</a>& b);
     28 };
     29 
     30 </pre>
     31 
     32 <a href='SkIPoint_Reference#SkIPoint'>SkIPoint</a> holds two 32-bit integer coordinates.<table style='border-collapse: collapse; width: 62.5em'>
     33 
     34   <tr><th style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>Type</th>
     35 <th style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>Member</th>
     36 <th style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>Description</th></tr>
     37   <tr style='background-color: #f0f0f0; '>
     38     <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>int32_t</td>
     39     <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '><a name='SkIPoint_fX'><code>fX</code></a></td>
     40     <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>
     41 x-axis value used by <a href='SkIPoint_Reference#IPoint'>IPoint</a>.
     42 </td>
     43   </tr>
     44   <tr>
     45     <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>int32_t</td>
     46     <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '><a name='SkIPoint_fY'><code>fY</code></a></td>
     47     <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>
     48 y-axis value used by <a href='SkIPoint_Reference#IPoint'>IPoint</a>.
     49 </td>
     50   </tr>
     51 </table>
     52 
     53 <a name='SkIPoint_Make'></a>
     54 
     55 ---
     56 
     57 <pre style="padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0">
     58 static constexpr <a href='SkIPoint_Reference#SkIPoint'>SkIPoint</a> <a href='#SkIPoint_Make'>Make</a>(int32_t x, int32_t y)
     59 </pre>
     60 
     61 Sets <a href='#SkIPoint_fX'>fX</a> to <a href='#SkIPoint_Make_x'>x</a>, <a href='#SkIPoint_fY'>fY</a> to <a href='#SkIPoint_Make_y'>y</a>.
     62 
     63 ### Parameters
     64 
     65 <table>  <tr>    <td><a name='SkIPoint_Make_x'><code><strong>x</strong></code></a></td>
     66     <td>integer x-axis value of constructed <a href='SkIPoint_Reference#SkIPoint'>SkIPoint</a></td>
     67   </tr>
     68   <tr>    <td><a name='SkIPoint_Make_y'><code><strong>y</strong></code></a></td>
     69     <td>integer y-axis value of constructed <a href='SkIPoint_Reference#SkIPoint'>SkIPoint</a></td>
     70   </tr>
     71 </table>
     72 
     73 ### Return Value
     74 
     75 <a href='SkIPoint_Reference#SkIPoint'>SkIPoint</a> (<a href='#SkIPoint_Make_x'>x</a>, <a href='#SkIPoint_Make_y'>y</a>)
     76 
     77 ### Example
     78 
     79 <div><fiddle-embed name="e5cf5159525bd3140f288a95fe641fae">
     80 
     81 #### Example Output
     82 
     83 ~~~~
     84 pt1 == pt2
     85 ~~~~
     86 
     87 </fiddle-embed></div>
     88 
     89 ### See Also
     90 
     91 <a href='#SkIPoint_set'>set()</a> <a href='SkPoint_Reference#SkPoint'>SkPoint</a>::<a href='#SkPoint_iset'>iset()</a> <a href='SkPoint_Reference#SkPoint'>SkPoint</a>::<a href='#SkPoint_Make'>Make</a>
     92 
     93 <a name='Property'></a>
     94 
     95 <a name='SkIPoint_x'></a>
     96 
     97 ---
     98 
     99 <pre style="padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0">
    100 int32_t <a href='#SkIPoint_x'>x()</a>const
    101 </pre>
    102 
    103 Returns x-axis value of <a href='SkIPoint_Reference#SkIPoint'>SkIPoint</a>.
    104 
    105 ### Return Value
    106 
    107 <a href='#SkIPoint_fX'>fX</a>
    108 
    109 ### Example
    110 
    111 <div><fiddle-embed name="eed4185294f8a8216fc354e6ee6b2e3a">
    112 
    113 #### Example Output
    114 
    115 ~~~~
    116 pt1.fX == pt1.x()
    117 ~~~~
    118 
    119 </fiddle-embed></div>
    120 
    121 ### See Also
    122 
    123 <a href='#SkIPoint_y'>y()</a> <a href='SkPoint_Reference#SkPoint'>SkPoint</a>::<a href='#SkPoint_x'>x()</a>
    124 
    125 <a name='SkIPoint_y'></a>
    126 
    127 ---
    128 
    129 <pre style="padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0">
    130 int32_t <a href='#SkIPoint_y'>y()</a>const
    131 </pre>
    132 
    133 Returns y-axis value of <a href='SkIPoint_Reference#SkIPoint'>SkIPoint</a>.
    134 
    135 ### Return Value
    136 
    137 <a href='#SkIPoint_fY'>fY</a>
    138 
    139 ### Example
    140 
    141 <div><fiddle-embed name="35c41b8ba7cebf8c9a7a8494e610e14d">
    142 
    143 #### Example Output
    144 
    145 ~~~~
    146 pt1.fY == pt1.y()
    147 ~~~~
    148 
    149 </fiddle-embed></div>
    150 
    151 ### See Also
    152 
    153 <a href='#SkIPoint_x'>x()</a> <a href='SkPoint_Reference#SkPoint'>SkPoint</a>::<a href='#SkPoint_y'>y()</a>
    154 
    155 <a name='SkIPoint_isZero'></a>
    156 
    157 ---
    158 
    159 <pre style="padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0">
    160 bool <a href='#SkIPoint_isZero'>isZero</a>()const
    161 </pre>
    162 
    163 Returns true if <a href='#SkIPoint_fX'>fX</a> and <a href='#SkIPoint_fY'>fY</a> are both zero.
    164 
    165 ### Return Value
    166 
    167 true if <a href='#SkIPoint_fX'>fX</a> is zero and <a href='#SkIPoint_fY'>fY</a> is zero
    168 
    169 ### Example
    170 
    171 <div><fiddle-embed name="658c1df611b4577cc7e0bb384e95737e">
    172 
    173 #### Example Output
    174 
    175 ~~~~
    176 pt.isZero() == true
    177 ~~~~
    178 
    179 </fiddle-embed></div>
    180 
    181 ### See Also
    182 
    183 <a href='SkPoint_Reference#SkPoint'>SkPoint</a>::<a href='#SkPoint_isZero'>isZero</a>
    184 
    185 <a name='Set'></a>
    186 
    187 <a name='SkIPoint_set'></a>
    188 
    189 ---
    190 
    191 <pre style="padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0">
    192 void set(int32_t x, int32_t y)
    193 </pre>
    194 
    195 Sets <a href='#SkIPoint_fX'>fX</a> to <a href='#SkIPoint_set_x'>x</a> and <a href='#SkIPoint_fY'>fY</a> to <a href='#SkIPoint_set_y'>y</a>.
    196 
    197 ### Parameters
    198 
    199 <table>  <tr>    <td><a name='SkIPoint_set_x'><code><strong>x</strong></code></a></td>
    200     <td>new value for <a href='#SkIPoint_fX'>fX</a></td>
    201   </tr>
    202   <tr>    <td><a name='SkIPoint_set_y'><code><strong>y</strong></code></a></td>
    203     <td>new value for <a href='#SkIPoint_fY'>fY</a></td>
    204   </tr>
    205 </table>
    206 
    207 ### Example
    208 
    209 <div><fiddle-embed name="165418b5718d79d8f1682a8a0ee32ba0">
    210 
    211 #### Example Output
    212 
    213 ~~~~
    214 pt1 == pt2
    215 ~~~~
    216 
    217 </fiddle-embed></div>
    218 
    219 ### See Also
    220 
    221 <a href='#SkIPoint_Make'>Make</a>
    222 
    223 <a name='SkIPoint_minus_operator'></a>
    224 
    225 ---
    226 
    227 <pre style="padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0">
    228 <a href='SkIPoint_Reference#SkIPoint'>SkIPoint</a> operator-()const
    229 </pre>
    230 
    231 Returns <a href='SkIPoint_Reference#SkIPoint'>SkIPoint</a> changing the signs of <a href='#SkIPoint_fX'>fX</a> and <a href='#SkIPoint_fY'>fY</a>.
    232 
    233 ### Return Value
    234 
    235 <a href='SkIPoint_Reference#SkIPoint'>SkIPoint</a> as (-<a href='#SkIPoint_fX'>fX</a>, -<a href='#SkIPoint_fY'>fY</a>)
    236 
    237 ### Example
    238 
    239 <div><fiddle-embed name="b30d4780475d113a7fed3637af7f0db1">
    240 
    241 #### Example Output
    242 
    243 ~~~~
    244 pt: 0, 0  negate: 0, 0
    245 pt: -1, -2  negate: 1, 2
    246 pt: 2147483647, -2147483647  negate: -2147483647, 2147483647
    247 pt: -2147483648, -2147483648  negate: -2147483648, -2147483648
    248 ~~~~
    249 
    250 </fiddle-embed></div>
    251 
    252 ### See Also
    253 
    254 <a href='#SkIPoint_subtract_operator'>operator-</a>(const <a href='SkIPoint_Reference#SkIPoint'>SkIPoint</a>& a, const <a href='SkIPoint_Reference#SkIPoint'>SkIPoint</a>& b) <a href='#SkIPoint_subtractfrom_operator'>operator-=</a>(const <a href='SkIPoint_Reference#SkIVector'>SkIVector</a>& v) <a href='SkPoint_Reference#SkPoint'>SkPoint</a>::operator-() const
    255 
    256 <a name='SkIPoint_addto_operator'></a>
    257 
    258 ---
    259 
    260 <pre style="padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0">
    261 void <a href='#SkIPoint_addto_operator'>operator+=</a>(const <a href='SkIPoint_Reference#SkIVector'>SkIVector</a>& v)
    262 </pre>
    263 
    264 Offsets <a href='SkIPoint_Reference#IPoint'>IPoint</a> by <a href='#IPoint_IVector'>IVector</a> <a href='#SkIPoint_addto_operator_v'>v</a>. Sets <a href='SkIPoint_Reference#IPoint'>IPoint</a> to <code>(<a href='#SkIPoint_fX'>fX</a> + <a href='#SkIPoint_addto_operator_v'>v</a>.<a href='#SkIPoint_fX'>fX</a>, <a href='#SkIPoint_fY'>fY</a> + <a href='#SkIPoint_addto_operator_v'>v</a>.<a href='#SkIPoint_fY'>fY</a>)</code>.
    265 
    266 ### Parameters
    267 
    268 <table>  <tr>    <td><a name='SkIPoint_addto_operator_v'><code><strong>v</strong></code></a></td>
    269     <td><a href='#IPoint_IVector'>IVector</a> to add</td>
    270   </tr>
    271 </table>
    272 
    273 ### Example
    274 
    275 <div><fiddle-embed name="4eb2d95c9e9a66f05296e345bb68bd51"></fiddle-embed></div>
    276 
    277 ### See Also
    278 
    279 <a href='#SkIPoint_add_operator'>operator+</a>(const <a href='SkIPoint_Reference#SkIPoint'>SkIPoint</a>& a, const <a href='SkIPoint_Reference#SkIVector'>SkIVector</a>& b) <a href='SkPoint_Reference#SkPoint'>SkPoint</a>::operator+=(const <a href='SkPoint_Reference#SkVector'>SkVector</a>& <a href='#SkIPoint_addto_operator_v'>v</a>)
    280 
    281 <a name='SkIPoint_subtractfrom_operator'></a>
    282 
    283 ---
    284 
    285 <pre style="padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0">
    286 void <a href='#SkIPoint_subtractfrom_operator'>operator-=</a>(const <a href='SkIPoint_Reference#SkIVector'>SkIVector</a>& v)
    287 </pre>
    288 
    289 Subtracts <a href='#IPoint_IVector'>IVector</a> <a href='#SkIPoint_subtractfrom_operator_v'>v</a> from <a href='SkIPoint_Reference#IPoint'>IPoint</a>. Sets <a href='SkIPoint_Reference#IPoint'>IPoint</a> to: <code>(<a href='#SkIPoint_fX'>fX</a> - <a href='#SkIPoint_subtractfrom_operator_v'>v</a>.<a href='#SkIPoint_fX'>fX</a>, <a href='#SkIPoint_fY'>fY</a> - <a href='#SkIPoint_subtractfrom_operator_v'>v</a>.<a href='#SkIPoint_fY'>fY</a>)</code>.
    290 
    291 ### Parameters
    292 
    293 <table>  <tr>    <td><a name='SkIPoint_subtractfrom_operator_v'><code><strong>v</strong></code></a></td>
    294     <td><a href='#IPoint_IVector'>IVector</a> to subtract</td>
    295   </tr>
    296 </table>
    297 
    298 ### Example
    299 
    300 <div><fiddle-embed name="a01e533dc7ab34ed728dc4e7a5f1f0ee"></fiddle-embed></div>
    301 
    302 ### See Also
    303 
    304 <a href='#SkIPoint_subtract_operator'>operator-</a>(const <a href='SkIPoint_Reference#SkIPoint'>SkIPoint</a>& a, const <a href='SkIPoint_Reference#SkIPoint'>SkIPoint</a>& b) <a href='SkPoint_Reference#SkPoint'>SkPoint</a>::operator-=(const <a href='SkPoint_Reference#SkVector'>SkVector</a>& <a href='#SkIPoint_subtractfrom_operator_v'>v</a>)
    305 
    306 <a name='SkIPoint_equals'></a>
    307 
    308 ---
    309 
    310 <pre style="padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0">
    311 bool equals(int32_t x, int32_t y)const
    312 </pre>
    313 
    314 Returns true if <a href='SkIPoint_Reference#SkIPoint'>SkIPoint</a> is equivalent to <a href='SkIPoint_Reference#SkIPoint'>SkIPoint</a> constructed from (<a href='#SkIPoint_equals_x'>x</a>, <a href='#SkIPoint_equals_y'>y</a>).
    315 
    316 ### Parameters
    317 
    318 <table>  <tr>    <td><a name='SkIPoint_equals_x'><code><strong>x</strong></code></a></td>
    319     <td>value compared with <a href='#SkIPoint_fX'>fX</a></td>
    320   </tr>
    321   <tr>    <td><a name='SkIPoint_equals_y'><code><strong>y</strong></code></a></td>
    322     <td>value compared with <a href='#SkIPoint_fY'>fY</a></td>
    323   </tr>
    324 </table>
    325 
    326 ### Return Value
    327 
    328 true if <a href='SkIPoint_Reference#SkIPoint'>SkIPoint</a> equals (<a href='#SkIPoint_equals_x'>x</a>, <a href='#SkIPoint_equals_y'>y</a>)
    329 
    330 ### Example
    331 
    332 <div><fiddle-embed name="64f575d36439d5b69aaed14ffeff1cc4">
    333 
    334 #### Example Output
    335 
    336 ~~~~
    337 pt: 0, 0  == pt
    338 pt: -1, -2  == pt
    339 pt: 2147483647, -1  == pt
    340 pt: -2147483648, -1  == pt
    341 ~~~~
    342 
    343 </fiddle-embed></div>
    344 
    345 ### See Also
    346 
    347 <a href='#SkIPoint_equal_operator'>operator==</a>(const <a href='SkIPoint_Reference#SkIPoint'>SkIPoint</a>& a, const <a href='SkIPoint_Reference#SkIPoint'>SkIPoint</a>& b)
    348 
    349 <a name='SkIPoint_equal_operator'></a>
    350 
    351 ---
    352 
    353 <pre style="padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0">
    354 bool <a href='#SkIPoint_equal_operator'>operator==</a>(const <a href='SkIPoint_Reference#SkIPoint'>SkIPoint</a>& a, const <a href='SkIPoint_Reference#SkIPoint'>SkIPoint</a>& b)
    355 </pre>
    356 
    357 Returns true if <a href='#SkIPoint_equal_operator_a'>a</a> is equivalent to <a href='#SkIPoint_equal_operator_b'>b</a>.
    358 
    359 ### Parameters
    360 
    361 <table>  <tr>    <td><a name='SkIPoint_equal_operator_a'><code><strong>a</strong></code></a></td>
    362     <td><a href='SkIPoint_Reference#SkIPoint'>SkIPoint</a> to compare</td>
    363   </tr>
    364   <tr>    <td><a name='SkIPoint_equal_operator_b'><code><strong>b</strong></code></a></td>
    365     <td><a href='SkIPoint_Reference#SkIPoint'>SkIPoint</a> to compare</td>
    366   </tr>
    367 </table>
    368 
    369 ### Return Value
    370 
    371 true if <a href='#SkIPoint_equal_operator_a'>a</a>.<a href='#SkIPoint_fX'>fX</a> == <a href='#SkIPoint_equal_operator_b'>b</a>.<a href='#SkIPoint_fX'>fX</a> and <a href='#SkIPoint_equal_operator_a'>a</a>.<a href='#SkIPoint_fY'>fY</a> == <a href='#SkIPoint_equal_operator_b'>b</a>.<a href='#SkIPoint_fY'>fY</a>
    372 
    373 ### Example
    374 
    375 <div><fiddle-embed name="37ffe2817d720f99e6c252332ce70460">
    376 
    377 #### Example Output
    378 
    379 ~~~~
    380 pt: 0, 0  == pt
    381 pt: -1, -2  == pt
    382 pt: 2147483647, -1  == pt
    383 pt: -2147483648, -1  == pt
    384 ~~~~
    385 
    386 </fiddle-embed></div>
    387 
    388 ### See Also
    389 
    390 <a href='#SkIPoint_equals'>equals()</a> <a href='#SkIPoint_notequal_operator'>operator!=</a>(const <a href='SkIPoint_Reference#SkIPoint'>SkIPoint</a>& <a href='#SkIPoint_equal_operator_a'>a</a>, const <a href='SkIPoint_Reference#SkIPoint'>SkIPoint</a>& <a href='#SkIPoint_equal_operator_b'>b</a>)
    391 
    392 <a name='SkIPoint_notequal_operator'></a>
    393 
    394 ---
    395 
    396 <pre style="padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0">
    397 bool <a href='#SkIPoint_notequal_operator'>operator!=</a>(const <a href='SkIPoint_Reference#SkIPoint'>SkIPoint</a>& a, const <a href='SkIPoint_Reference#SkIPoint'>SkIPoint</a>& b)
    398 </pre>
    399 
    400 Returns true if <a href='#SkIPoint_notequal_operator_a'>a</a> is not equivalent to <a href='#SkIPoint_notequal_operator_b'>b</a>.
    401 
    402 ### Parameters
    403 
    404 <table>  <tr>    <td><a name='SkIPoint_notequal_operator_a'><code><strong>a</strong></code></a></td>
    405     <td><a href='SkIPoint_Reference#SkIPoint'>SkIPoint</a> to compare</td>
    406   </tr>
    407   <tr>    <td><a name='SkIPoint_notequal_operator_b'><code><strong>b</strong></code></a></td>
    408     <td><a href='SkIPoint_Reference#SkIPoint'>SkIPoint</a> to compare</td>
    409   </tr>
    410 </table>
    411 
    412 ### Return Value
    413 
    414 true if <a href='#SkIPoint_notequal_operator_a'>a</a>.<a href='#SkIPoint_fX'>fX</a> != <a href='#SkIPoint_notequal_operator_b'>b</a>.<a href='#SkIPoint_fX'>fX</a> or <a href='#SkIPoint_notequal_operator_a'>a</a>.<a href='#SkIPoint_fY'>fY</a> != <a href='#SkIPoint_notequal_operator_b'>b</a>.<a href='#SkIPoint_fY'>fY</a>
    415 
    416 ### Example
    417 
    418 <div><fiddle-embed name="dd89dc48dff69b53d99530b120f204bc">
    419 
    420 #### Example Output
    421 
    422 ~~~~
    423 pt: 0, 0  == pt
    424 pt: -1, -2  == pt
    425 pt: 2147483647, -1  == pt
    426 pt: -2147483648, -1  == pt
    427 ~~~~
    428 
    429 </fiddle-embed></div>
    430 
    431 ### See Also
    432 
    433 <a href='#SkIPoint_equal_operator'>operator==</a>(const <a href='SkIPoint_Reference#SkIPoint'>SkIPoint</a>& <a href='#SkIPoint_notequal_operator_a'>a</a>, const <a href='SkIPoint_Reference#SkIPoint'>SkIPoint</a>& <a href='#SkIPoint_notequal_operator_b'>b</a>) <a href='#SkIPoint_equals'>equals()</a>
    434 
    435 <a name='SkIPoint_subtract_operator'></a>
    436 
    437 ---
    438 
    439 <pre style="padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0">
    440 <a href='SkIPoint_Reference#SkIVector'>SkIVector</a> <a href='#SkIPoint_subtract_operator'>operator-</a>(const <a href='SkIPoint_Reference#SkIPoint'>SkIPoint</a>& a, const <a href='SkIPoint_Reference#SkIPoint'>SkIPoint</a>& b)
    441 </pre>
    442 
    443 Returns <a href='#IPoint_IVector'>IVector</a> from <a href='#SkIPoint_subtract_operator_b'>b</a> to <a href='#SkIPoint_subtract_operator_a'>a</a>; computed as <code>(<a href='#SkIPoint_subtract_operator_a'>a</a>.<a href='#SkIPoint_fX'>fX</a> - <a href='#SkIPoint_subtract_operator_b'>b</a>.<a href='#SkIPoint_fX'>fX</a>, <a href='#SkIPoint_subtract_operator_a'>a</a>.<a href='#SkIPoint_fY'>fY</a> - <a href='#SkIPoint_subtract_operator_b'>b</a>.<a href='#SkIPoint_fY'>fY</a>)</code>.
    444 
    445 Can also be used to subtract <a href='#IPoint_IVector'>IVector</a> from <a href='#IPoint_IVector'>IVector</a>, returning <a href='#IPoint_IVector'>IVector</a>.
    446 
    447 ### Parameters
    448 
    449 <table>  <tr>    <td><a name='SkIPoint_subtract_operator_a'><code><strong>a</strong></code></a></td>
    450     <td><a href='SkIPoint_Reference#IPoint'>IPoint</a> or <a href='#IPoint_IVector'>IVector</a> to subtract from</td>
    451   </tr>
    452   <tr>    <td><a name='SkIPoint_subtract_operator_b'><code><strong>b</strong></code></a></td>
    453     <td><a href='#IPoint_IVector'>IVector</a> to subtract</td>
    454   </tr>
    455 </table>
    456 
    457 ### Return Value
    458 
    459 <a href='#IPoint_IVector'>IVector</a> from <a href='#SkIPoint_subtract_operator_b'>b</a> to <a href='#SkIPoint_subtract_operator_a'>a</a>
    460 
    461 ### Example
    462 
    463 <div><fiddle-embed name="e626e26bf557857b824aa7d03f723e0f"></fiddle-embed></div>
    464 
    465 ### See Also
    466 
    467 <a href='#SkIPoint_subtractfrom_operator'>operator-=</a>(const <a href='SkIPoint_Reference#SkIVector'>SkIVector</a>& v)
    468 
    469 <a name='SkIPoint_add_operator'></a>
    470 
    471 ---
    472 
    473 <pre style="padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0">
    474 <a href='SkIPoint_Reference#SkIPoint'>SkIPoint</a> <a href='#SkIPoint_add_operator'>operator+</a>(const <a href='SkIPoint_Reference#SkIPoint'>SkIPoint</a>& a, const <a href='SkIPoint_Reference#SkIVector'>SkIVector</a>& b)
    475 </pre>
    476 
    477 Returns <a href='SkIPoint_Reference#IPoint'>IPoint</a> resulting from <a href='SkIPoint_Reference#IPoint'>IPoint</a> <a href='#SkIPoint_add_operator_a'>a</a> offset by <a href='#IPoint_IVector'>IVector</a> <a href='#SkIPoint_add_operator_b'>b</a>, computed as:
    478 <code>(<a href='#SkIPoint_add_operator_a'>a</a>.<a href='#SkIPoint_fX'>fX</a> + <a href='#SkIPoint_add_operator_b'>b</a>.<a href='#SkIPoint_fX'>fX</a>, <a href='#SkIPoint_add_operator_a'>a</a>.<a href='#SkIPoint_fY'>fY</a> + <a href='#SkIPoint_add_operator_b'>b</a>.<a href='#SkIPoint_fY'>fY</a>)</code>.
    479 
    480 Can also be used to offset <a href='SkIPoint_Reference#IPoint'>IPoint</a> <a href='#SkIPoint_add_operator_b'>b</a> by <a href='#IPoint_IVector'>IVector</a> <a href='#SkIPoint_add_operator_a'>a</a>, returning <a href='SkIPoint_Reference#IPoint'>IPoint</a>.
    481 Can also be used to add <a href='#IPoint_IVector'>IVector</a> to <a href='#IPoint_IVector'>IVector</a>, returning <a href='#IPoint_IVector'>IVector</a>.
    482 
    483 ### Parameters
    484 
    485 <table>  <tr>    <td><a name='SkIPoint_add_operator_a'><code><strong>a</strong></code></a></td>
    486     <td><a href='SkIPoint_Reference#IPoint'>IPoint</a> or <a href='#IPoint_IVector'>IVector</a> to add to</td>
    487   </tr>
    488   <tr>    <td><a name='SkIPoint_add_operator_b'><code><strong>b</strong></code></a></td>
    489     <td><a href='SkIPoint_Reference#IPoint'>IPoint</a> or <a href='#IPoint_IVector'>IVector</a> to add</td>
    490   </tr>
    491 </table>
    492 
    493 ### Return Value
    494 
    495 <a href='SkIPoint_Reference#IPoint'>IPoint</a> equal to <a href='#SkIPoint_add_operator_a'>a</a> offset by <a href='#SkIPoint_add_operator_b'>b</a>
    496 
    497 ### Example
    498 
    499 <div><fiddle-embed name="63f4cba971c6d8434595906f865b5a29"></fiddle-embed></div>
    500 
    501 ### See Also
    502 
    503 <a href='#SkIPoint_addto_operator'>operator+=</a>(const <a href='SkIPoint_Reference#SkIVector'>SkIVector</a>& v)
    504 
    505 <a name='IVector'></a>
    506 
    507 <a name='SkIVector'></a>
    508 
    509 ---
    510 
    511 <pre style="padding: 1em 1em 1em 1em;width: 62.5em; background-color: #f0f0f0">
    512     typedef <a href='SkIPoint_Reference#SkIPoint'>SkIPoint</a> <a href='SkIPoint_Reference#SkIVector'>SkIVector</a>;
    513 </pre>
    514 
    515 <a href='SkIPoint_Reference#SkIVector'>SkIVector</a> provides an alternative name for <a href='SkIPoint_Reference#SkIPoint'>SkIPoint</a>. <a href='SkIPoint_Reference#SkIVector'>SkIVector</a> and <a href='SkIPoint_Reference#SkIPoint'>SkIPoint</a>
    516 can be used interchangeably for all purposes.