1SkPoint Reference 2=== 3 4 5<a name='SkPoint'></a> 6 7--- 8 9<pre style="padding: 1em 1em 1em 1em;width: 62.5em; background-color: #f0f0f0"> 10struct <a href='SkPoint_Reference#SkPoint'>SkPoint</a> { 11 12 <a href='undocumented#SkScalar'>SkScalar</a> <a href='#SkPoint_fX'>fX</a>; 13 <a href='undocumented#SkScalar'>SkScalar</a> <a href='#SkPoint_fY'>fY</a>; 14 15 static constexpr <a href='SkPoint_Reference#SkPoint'>SkPoint</a> <a href='#SkPoint_Make'>Make</a>(<a href='undocumented#SkScalar'>SkScalar</a> x, <a href='undocumented#SkScalar'>SkScalar</a> y); 16 <a href='undocumented#SkScalar'>SkScalar</a> <a href='#SkPoint_x'>x()</a> const; 17 <a href='undocumented#SkScalar'>SkScalar</a> <a href='#SkPoint_y'>y()</a> const; 18 bool <a href='#SkPoint_isZero'>isZero</a>() const; 19 void <a href='#SkPoint_set'>set</a>(<a href='undocumented#SkScalar'>SkScalar</a> x, <a href='undocumented#SkScalar'>SkScalar</a> y); 20 void <a href='#SkPoint_iset'>iset</a>(int32_t x, int32_t y); 21 void <a href='#SkPoint_iset'>iset</a>(const <a href='SkIPoint_Reference#SkIPoint'>SkIPoint</a>& p); 22 void <a href='#SkPoint_setAbs'>setAbs</a>(const <a href='SkPoint_Reference#SkPoint'>SkPoint</a>& pt); 23 static void <a href='#SkPoint_Offset'>Offset</a>(<a href='SkPoint_Reference#SkPoint'>SkPoint</a> <a href='SkPoint_Reference#Point'>points</a>[], int count, const <a href='SkPoint_Reference#SkVector'>SkVector</a>& offset); 24 static void <a href='#SkPoint_Offset'>Offset</a>(<a href='SkPoint_Reference#SkPoint'>SkPoint</a> <a href='SkPoint_Reference#Point'>points</a>[], int count, <a href='undocumented#SkScalar'>SkScalar</a> dx, <a href='undocumented#SkScalar'>SkScalar</a> dy); 25 void <a href='#SkPoint_offset'>offset</a>(<a href='undocumented#SkScalar'>SkScalar</a> dx, <a href='undocumented#SkScalar'>SkScalar</a> dy); 26 <a href='undocumented#SkScalar'>SkScalar</a> <a href='#SkPoint_length'>length()</a> const; 27 <a href='undocumented#SkScalar'>SkScalar</a> <a href='#SkPoint_distanceToOrigin'>distanceToOrigin</a>() const; 28 bool <a href='#SkPoint_normalize'>normalize()</a>; 29 bool <a href='#SkPoint_setNormalize'>setNormalize</a>(<a href='undocumented#SkScalar'>SkScalar</a> x, <a href='undocumented#SkScalar'>SkScalar</a> y); 30 bool <a href='#SkPoint_setLength'>setLength</a>(<a href='undocumented#SkScalar'>SkScalar</a> length); 31 bool <a href='#SkPoint_setLength'>setLength</a>(<a href='undocumented#SkScalar'>SkScalar</a> x, <a href='undocumented#SkScalar'>SkScalar</a> y, <a href='undocumented#SkScalar'>SkScalar</a> length); 32 void <a href='#SkPoint_scale'>scale</a>(<a href='undocumented#SkScalar'>SkScalar</a> scale, <a href='SkPoint_Reference#SkPoint'>SkPoint</a>* dst) const; 33 void <a href='#SkPoint_scale'>scale</a>(<a href='undocumented#SkScalar'>SkScalar</a> value); 34 void <a href='#SkPoint_negate'>negate()</a>; 35 <a href='SkPoint_Reference#SkPoint'>SkPoint</a> operator-() const; 36 void <a href='#SkPoint_addto_operator'>operator+=</a>(const <a href='SkPoint_Reference#SkVector'>SkVector</a>& v); 37 void <a href='#SkPoint_subtractfrom_operator'>operator-=</a>(const <a href='SkPoint_Reference#SkVector'>SkVector</a>& v); 38 <a href='SkPoint_Reference#SkPoint'>SkPoint</a> <a href='#SkPoint_multiply_operator'>operator*</a>(<a href='undocumented#SkScalar'>SkScalar</a> scale) const; 39 <a href='SkPoint_Reference#SkPoint'>SkPoint</a>& <a href='#SkPoint_multiplyby_operator'>operator*=</a>(<a href='undocumented#SkScalar'>SkScalar</a> scale); 40 bool <a href='#SkPoint_isFinite'>isFinite</a>() const; 41 bool <a href='#SkPoint_equals'>equals</a>(<a href='undocumented#SkScalar'>SkScalar</a> x, <a href='undocumented#SkScalar'>SkScalar</a> y) const; 42 friend bool <a href='#SkPoint_equal_operator'>operator==</a>(const <a href='SkPoint_Reference#SkPoint'>SkPoint</a>& a, const <a href='SkPoint_Reference#SkPoint'>SkPoint</a>& b); 43 friend bool <a href='#SkPoint_notequal_operator'>operator!=</a>(const <a href='SkPoint_Reference#SkPoint'>SkPoint</a>& a, const <a href='SkPoint_Reference#SkPoint'>SkPoint</a>& b); 44 friend <a href='SkPoint_Reference#SkVector'>SkVector</a> <a href='#SkPoint_subtract_operator'>operator-</a>(const <a href='SkPoint_Reference#SkPoint'>SkPoint</a>& a, const <a href='SkPoint_Reference#SkPoint'>SkPoint</a>& b); 45 friend <a href='SkPoint_Reference#SkPoint'>SkPoint</a> <a href='#SkPoint_add_operator'>operator+</a>(const <a href='SkPoint_Reference#SkPoint'>SkPoint</a>& a, const <a href='SkPoint_Reference#SkVector'>SkVector</a>& b); 46 static <a href='undocumented#SkScalar'>SkScalar</a> <a href='#SkPoint_Length'>Length</a>(<a href='undocumented#SkScalar'>SkScalar</a> x, <a href='undocumented#SkScalar'>SkScalar</a> y); 47 static <a href='undocumented#SkScalar'>SkScalar</a> <a href='#SkPoint_Normalize'>Normalize</a>(<a href='SkPoint_Reference#SkVector'>SkVector</a>* vec); 48 static <a href='undocumented#SkScalar'>SkScalar</a> <a href='#SkPoint_Distance'>Distance</a>(const <a href='SkPoint_Reference#SkPoint'>SkPoint</a>& a, const <a href='SkPoint_Reference#SkPoint'>SkPoint</a>& b); 49 static <a href='undocumented#SkScalar'>SkScalar</a> <a href='#SkPoint_DotProduct'>DotProduct</a>(const <a href='SkPoint_Reference#SkVector'>SkVector</a>& a, const <a href='SkPoint_Reference#SkVector'>SkVector</a>& b); 50 static <a href='undocumented#SkScalar'>SkScalar</a> <a href='#SkPoint_CrossProduct'>CrossProduct</a>(const <a href='SkPoint_Reference#SkVector'>SkVector</a>& a, const <a href='SkPoint_Reference#SkVector'>SkVector</a>& b); 51 <a href='undocumented#SkScalar'>SkScalar</a> <a href='#SkPoint_cross'>cross</a>(const <a href='SkPoint_Reference#SkVector'>SkVector</a>& vec) const; 52 <a href='undocumented#SkScalar'>SkScalar</a> <a href='#SkPoint_dot'>dot</a>(const <a href='SkPoint_Reference#SkVector'>SkVector</a>& vec) const; 53}; 54 55</pre> 56 57<a href='SkPoint_Reference#SkPoint'>SkPoint</a> holds two 32-bit floating <a href='SkPoint_Reference#Point'>point</a> coordinates.<table style='border-collapse: collapse; width: 62.5em'> 58 59 <tr><th style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>Type</th> 60<th style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>Member</th> 61<th style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>Description</th></tr> 62 <tr style='background-color: #f0f0f0; '> 63 <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>SkScalar</td> 64 <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '><a name='SkPoint_fX'><code>fX</code></a></td> 65 <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '> 66x-axis value used by both <a href='SkPoint_Reference#Point'>Point</a> and <a href='SkPoint_Reference#Vector'>Vector</a>. May contain any value, including 67infinities and NaN. 68</td> 69 </tr> 70 <tr> 71 <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '>SkScalar</td> 72 <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '><a name='SkPoint_fY'><code>fY</code></a></td> 73 <td style='text-align: left; border: 2px solid #dddddd; padding: 8px; '> 74y-axis value used by both <a href='SkPoint_Reference#Point'>Point</a> and <a href='SkPoint_Reference#Vector'>Vector</a>. May contain any value, including 75infinities and NaN. 76</td> 77 </tr> 78</table> 79 80<a name='SkPoint_Make'></a> 81 82--- 83 84<pre style="padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0"> 85static constexpr <a href='SkPoint_Reference#SkPoint'>SkPoint</a> <a href='#SkPoint_Make'>Make</a>(<a href='undocumented#SkScalar'>SkScalar</a> x, <a href='undocumented#SkScalar'>SkScalar</a> y) 86</pre> 87 88Sets <a href='#SkPoint_fX'>fX</a> to <a href='#SkPoint_Make_x'>x</a>, <a href='#SkPoint_fY'>fY</a> to <a href='#SkPoint_Make_y'>y</a>. Used both to set <a href='SkPoint_Reference#SkPoint'>SkPoint</a> and <a href='SkPoint_Reference#Vector'>vector</a>. 89 90### Parameters 91 92<table> <tr> <td><a name='SkPoint_Make_x'><code><strong>x</strong></code></a></td> 93 <td><a href='undocumented#SkScalar'>SkScalar</a> x-axis value of constructed <a href='SkPoint_Reference#SkPoint'>SkPoint</a> or <a href='SkPoint_Reference#Vector'>vector</a></td> 94 </tr> 95 <tr> <td><a name='SkPoint_Make_y'><code><strong>y</strong></code></a></td> 96 <td><a href='undocumented#SkScalar'>SkScalar</a> y-axis value of constructed <a href='SkPoint_Reference#SkPoint'>SkPoint</a> or <a href='SkPoint_Reference#Vector'>vector</a></td> 97 </tr> 98</table> 99 100### Return Value 101 102<a href='SkPoint_Reference#SkPoint'>SkPoint</a> (<a href='#SkPoint_Make_x'>x</a>, <a href='#SkPoint_Make_y'>y</a>) 103 104### Example 105 106<div><fiddle-embed name="d266e70977847001f7c42f8a2513bee7"> 107 108#### Example Output 109 110~~~~ 111all equal 112~~~~ 113 114</fiddle-embed></div> 115 116### See Also 117 118<a href='#SkPoint_set'>set()</a> <a href='#SkPoint_iset'>iset()</a> <a href='SkIPoint_Reference#SkIPoint'>SkIPoint</a>::<a href='#SkIPoint_Make'>Make</a> 119 120<a name='Property'></a> 121 122<a name='SkPoint_x'></a> 123 124--- 125 126<pre style="padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0"> 127<a href='undocumented#SkScalar'>SkScalar</a> <a href='#SkPoint_x'>x()</a>const 128</pre> 129 130Returns x-axis value of <a href='SkPoint_Reference#SkPoint'>SkPoint</a> or <a href='SkPoint_Reference#Vector'>vector</a>. 131 132### Return Value 133 134<a href='#SkPoint_fX'>fX</a> 135 136### Example 137 138<div><fiddle-embed name="9f3fe446b800ae1d940785d438634941"> 139 140#### Example Output 141 142~~~~ 143pt1.fX == pt1.x() 144~~~~ 145 146</fiddle-embed></div> 147 148### See Also 149 150<a href='#SkPoint_y'>y()</a> <a href='SkIPoint_Reference#SkIPoint'>SkIPoint</a>::<a href='#SkIPoint_x'>x()</a> 151 152<a name='SkPoint_y'></a> 153 154--- 155 156<pre style="padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0"> 157<a href='undocumented#SkScalar'>SkScalar</a> <a href='#SkPoint_y'>y()</a>const 158</pre> 159 160Returns y-axis value of <a href='SkPoint_Reference#SkPoint'>SkPoint</a> or <a href='SkPoint_Reference#Vector'>vector</a>. 161 162### Return Value 163 164<a href='#SkPoint_fY'>fY</a> 165 166### Example 167 168<div><fiddle-embed name="4c962850c2dbea4d2325df469400680e"> 169 170#### Example Output 171 172~~~~ 173pt1.fY == pt1.y() 174~~~~ 175 176</fiddle-embed></div> 177 178### See Also 179 180<a href='#SkPoint_x'>x()</a> <a href='SkIPoint_Reference#SkIPoint'>SkIPoint</a>::<a href='#SkIPoint_y'>y()</a> 181 182<a name='SkPoint_isZero'></a> 183 184--- 185 186<pre style="padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0"> 187bool <a href='#SkPoint_isZero'>isZero</a>()const 188</pre> 189 190Returns true if <a href='#SkPoint_fX'>fX</a> and <a href='#SkPoint_fY'>fY</a> are both zero. 191 192### Return Value 193 194true if <a href='#SkPoint_fX'>fX</a> is zero and <a href='#SkPoint_fY'>fY</a> is zero 195 196### Example 197 198<div><fiddle-embed name="81b9665110b88ef6bcbc20464aed7da1"> 199 200#### Example Output 201 202~~~~ 203pt.fX=+0 pt.fY=-0 204pt.isZero() == true 205~~~~ 206 207</fiddle-embed></div> 208 209### See Also 210 211<a href='#SkPoint_isFinite'>isFinite</a> <a href='SkIPoint_Reference#SkIPoint'>SkIPoint</a>::<a href='#SkIPoint_isZero'>isZero</a> 212 213<a name='Set'></a> 214 215<a name='SkPoint_set'></a> 216 217--- 218 219<pre style="padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0"> 220void set(<a href='undocumented#SkScalar'>SkScalar</a> x, <a href='undocumented#SkScalar'>SkScalar</a> y) 221</pre> 222 223Sets <a href='#SkPoint_fX'>fX</a> to <a href='#SkPoint_set_x'>x</a> and <a href='#SkPoint_fY'>fY</a> to <a href='#SkPoint_set_y'>y</a>. 224 225### Parameters 226 227<table> <tr> <td><a name='SkPoint_set_x'><code><strong>x</strong></code></a></td> 228 <td>new value for <a href='#SkPoint_fX'>fX</a></td> 229 </tr> 230 <tr> <td><a name='SkPoint_set_y'><code><strong>y</strong></code></a></td> 231 <td>new value for <a href='#SkPoint_fY'>fY</a></td> 232 </tr> 233</table> 234 235### Example 236 237<div><fiddle-embed name="d08d1e7dafcad4342d1619fdbb2f5781"> 238 239#### Example Output 240 241~~~~ 242pt1 == pt2 243~~~~ 244 245</fiddle-embed></div> 246 247### See Also 248 249<a href='#SkPoint_iset'>iset()</a> <a href='#SkPoint_Make'>Make</a> 250 251<a name='SkPoint_iset'></a> 252 253--- 254 255<pre style="padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0"> 256void <a href='#SkPoint_iset'>iset</a>(int32_t x, int32_t y) 257</pre> 258 259Sets <a href='#SkPoint_fX'>fX</a> to <a href='#SkPoint_iset_x'>x</a> and <a href='#SkPoint_fY'>fY</a> to <a href='#SkPoint_iset_y'>y</a>, promoting integers to <a href='undocumented#SkScalar'>SkScalar</a> values. 260 261Assigning a large integer value directly to <a href='#SkPoint_fX'>fX</a> or <a href='#SkPoint_fY'>fY</a> may cause a compiler 262error, triggered by narrowing conversion of int to <a href='undocumented#SkScalar'>SkScalar</a>. This safely 263casts <a href='#SkPoint_iset_x'>x</a> and <a href='#SkPoint_iset_y'>y</a> to avoid the error. 264 265### Parameters 266 267<table> <tr> <td><a name='SkPoint_iset_x'><code><strong>x</strong></code></a></td> 268 <td>new value for <a href='#SkPoint_fX'>fX</a></td> 269 </tr> 270 <tr> <td><a name='SkPoint_iset_y'><code><strong>y</strong></code></a></td> 271 <td>new value for <a href='#SkPoint_fY'>fY</a></td> 272 </tr> 273</table> 274 275### Example 276 277<div><fiddle-embed name="0d9e8ed734981b5b113f22c7bfde5357"></fiddle-embed></div> 278 279### See Also 280 281<a href='#SkPoint_set'>set</a> <a href='#SkPoint_Make'>Make</a> <a href='SkIPoint_Reference#SkIPoint'>SkIPoint</a>::<a href='#SkIPoint_set'>set</a> 282 283<a name='SkPoint_iset_2'></a> 284 285--- 286 287<pre style="padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0"> 288void <a href='#SkPoint_iset'>iset</a>(const <a href='SkIPoint_Reference#SkIPoint'>SkIPoint</a>& p) 289</pre> 290 291Sets <a href='#SkPoint_fX'>fX</a> to <a href='#SkPoint_iset_2_p'>p</a>.<a href='#SkIPoint_fX'>fX</a> and <a href='#SkPoint_fY'>fY</a> to <a href='#SkPoint_iset_2_p'>p</a>.<a href='#SkIPoint_fY'>fY</a>, promoting integers to <a href='undocumented#SkScalar'>SkScalar</a> values. 292 293Assigning an <a href='SkIPoint_Reference#SkIPoint'>SkIPoint</a> containing a large integer value directly to <a href='#SkPoint_fX'>fX</a> or <a href='#SkPoint_fY'>fY</a> may 294cause a compiler error, triggered by narrowing conversion of int to <a href='undocumented#SkScalar'>SkScalar</a>. 295This safely casts <a href='#SkPoint_iset_2_p'>p</a>.<a href='#SkIPoint_fX'>fX</a> and <a href='#SkPoint_iset_2_p'>p</a>.<a href='#SkIPoint_fY'>fY</a> to avoid the error. 296 297### Parameters 298 299<table> <tr> <td><a name='SkPoint_iset_2_p'><code><strong>p</strong></code></a></td> 300 <td><a href='SkIPoint_Reference#SkIPoint'>SkIPoint</a> members promoted to <a href='undocumented#SkScalar'>SkScalar</a></td> 301 </tr> 302</table> 303 304### Example 305 306<div><fiddle-embed name="12b7164a769e232bb772f19c59600ee7"> 307 308#### Example Output 309 310~~~~ 311iPt: -2147483647, 2147483647 312fPt: -2.14748e+09, 2.14748e+09 313~~~~ 314 315</fiddle-embed></div> 316 317### See Also 318 319<a href='#SkPoint_set'>set</a> <a href='#SkPoint_Make'>Make</a> <a href='SkIPoint_Reference#SkIPoint'>SkIPoint</a>::<a href='#SkIPoint_set'>set</a> 320 321<a name='SkPoint_setAbs'></a> 322 323--- 324 325<pre style="padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0"> 326void <a href='#SkPoint_setAbs'>setAbs</a>(const <a href='SkPoint_Reference#SkPoint'>SkPoint</a>& pt) 327</pre> 328 329Sets <a href='#SkPoint_fX'>fX</a> to absolute value of <a href='#SkPoint_setAbs_pt'>pt</a>.<a href='#SkPoint_fX'>fX</a>; and <a href='#SkPoint_fY'>fY</a> to absolute value of <a href='#SkPoint_setAbs_pt'>pt</a>.<a href='#SkPoint_fY'>fY</a>. 330 331### Parameters 332 333<table> <tr> <td><a name='SkPoint_setAbs_pt'><code><strong>pt</strong></code></a></td> 334 <td>members providing magnitude for <a href='#SkPoint_fX'>fX</a> and <a href='#SkPoint_fY'>fY</a></td> 335 </tr> 336</table> 337 338### Example 339 340<div><fiddle-embed name="7f70860e820b67a347cff03c00488426"> 341 342#### Example Output 343 344~~~~ 345pt: 0, -0 abs: 0, 0 346pt: -1, -2 abs: 1, 2 347pt: inf, -inf abs: inf, inf 348pt: nan, -nan abs: nan, nan 349~~~~ 350 351</fiddle-embed></div> 352 353### See Also 354 355<a href='#SkPoint_set'>set</a> <a href='#SkPoint_Make'>Make</a> <a href='#SkPoint_negate'>negate</a> 356 357<a name='Offset'></a> 358 359<a name='SkPoint_Offset'></a> 360 361--- 362 363<pre style="padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0"> 364static void <a href='#SkPoint_Offset'>Offset</a>(<a href='SkPoint_Reference#SkPoint'>SkPoint</a> <a href='SkPoint_Reference#Point'>points</a>[], int count, const <a href='SkPoint_Reference#SkVector'>SkVector</a>& offset) 365</pre> 366 367Adds <a href='#SkPoint_Offset_offset'>offset</a> to each <a href='SkPoint_Reference#SkPoint'>SkPoint</a> in <a href='#SkPoint_Offset_points'>points</a> array with <a href='#SkPoint_Offset_count'>count</a> entries. 368 369### Parameters 370 371<table> <tr> <td><a name='SkPoint_Offset_points'><code><strong>points</strong></code></a></td> 372 <td><a href='SkPath_Reference#Point_Array'>SkPoint array</a></td> 373 </tr> 374 <tr> <td><a name='SkPoint_Offset_count'><code><strong>count</strong></code></a></td> 375 <td>entries in array</td> 376 </tr> 377 <tr> <td><a name='SkPoint_Offset_offset'><code><strong>offset</strong></code></a></td> 378 <td><a href='SkPoint_Reference#Vector'>vector</a> added to <a href='#SkPoint_Offset_points'>points</a></td> 379 </tr> 380</table> 381 382### Example 383 384<div><fiddle-embed name="f0f24726df78a5d797bcf311e694a0a3"></fiddle-embed></div> 385 386### See Also 387 388<a href='#SkPoint_Offset_offset'>offset</a> <a href='#SkPoint_addto_operator'>operator+=</a>(const <a href='SkPoint_Reference#SkVector'>SkVector</a>& v) 389 390<a name='SkPoint_Offset_2'></a> 391 392--- 393 394<pre style="padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0"> 395static void <a href='#SkPoint_Offset'>Offset</a>(<a href='SkPoint_Reference#SkPoint'>SkPoint</a> <a href='SkPoint_Reference#Point'>points</a>[], int count, <a href='undocumented#SkScalar'>SkScalar</a> dx, <a href='undocumented#SkScalar'>SkScalar</a> dy) 396</pre> 397 398Adds offset (<a href='#SkPoint_Offset_2_dx'>dx</a>, <a href='#SkPoint_Offset_2_dy'>dy</a>) to each <a href='SkPoint_Reference#SkPoint'>SkPoint</a> in <a href='#SkPoint_Offset_2_points'>points</a> array of length <a href='#SkPoint_Offset_2_count'>count</a>. 399 400### Parameters 401 402<table> <tr> <td><a name='SkPoint_Offset_2_points'><code><strong>points</strong></code></a></td> 403 <td><a href='SkPath_Reference#Point_Array'>SkPoint array</a></td> 404 </tr> 405 <tr> <td><a name='SkPoint_Offset_2_count'><code><strong>count</strong></code></a></td> 406 <td>entries in array</td> 407 </tr> 408 <tr> <td><a name='SkPoint_Offset_2_dx'><code><strong>dx</strong></code></a></td> 409 <td>added to <a href='#SkPoint_fX'>fX</a> in <a href='#SkPoint_Offset_2_points'>points</a></td> 410 </tr> 411 <tr> <td><a name='SkPoint_Offset_2_dy'><code><strong>dy</strong></code></a></td> 412 <td>added to <a href='#SkPoint_fY'>fY</a> in <a href='#SkPoint_Offset_2_points'>points</a></td> 413 </tr> 414</table> 415 416### Example 417 418<div><fiddle-embed name="532849faa838de885b86d3ebffae3712"></fiddle-embed></div> 419 420### See Also 421 422<a href='#SkPoint_offset'>offset</a> <a href='#SkPoint_addto_operator'>operator+=</a>(const <a href='SkPoint_Reference#SkVector'>SkVector</a>& v) 423 424<a name='SkPoint_offset'></a> 425 426--- 427 428<pre style="padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0"> 429void offset(<a href='undocumented#SkScalar'>SkScalar</a> dx, <a href='undocumented#SkScalar'>SkScalar</a> dy) 430</pre> 431 432Adds offset (<a href='#SkPoint_offset_dx'>dx</a>, <a href='#SkPoint_offset_dy'>dy</a>) to <a href='SkPoint_Reference#SkPoint'>SkPoint</a>. 433 434### Parameters 435 436<table> <tr> <td><a name='SkPoint_offset_dx'><code><strong>dx</strong></code></a></td> 437 <td>added to <a href='#SkPoint_fX'>fX</a></td> 438 </tr> 439 <tr> <td><a name='SkPoint_offset_dy'><code><strong>dy</strong></code></a></td> 440 <td>added to <a href='#SkPoint_fY'>fY</a></td> 441 </tr> 442</table> 443 444### Example 445 446<div><fiddle-embed name="02750ceaa874f956e6e6544ef6b858ee"></fiddle-embed></div> 447 448### See Also 449 450<a href='#SkPoint_Offset'>Offset</a> <a href='#SkPoint_addto_operator'>operator+=</a>(const <a href='SkPoint_Reference#SkVector'>SkVector</a>& v) 451 452<a name='SkPoint_length'></a> 453 454--- 455 456<pre style="padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0"> 457<a href='undocumented#SkScalar'>SkScalar</a> <a href='#SkPoint_length'>length()</a>const 458</pre> 459 460Returns the Euclidean distance from origin, computed as: 461 462<a href='undocumented#sqrt()'>sqrt</a>(<a href='#SkPoint_fX'>fX</a> * <a href='#SkPoint_fX'>fX</a> + <a href='#SkPoint_fY'>fY</a> * <a href='#SkPoint_fY'>fY</a>) 463 464. 465 466### Return Value 467 468straight-line distance to origin 469 470### Example 471 472<div><fiddle-embed name="8363ab179447ee4b827679e20d3d81eb"></fiddle-embed></div> 473 474### See Also 475 476<a href='#SkPoint_distanceToOrigin'>distanceToOrigin</a> <a href='#SkPoint_Length'>Length</a> <a href='#SkPoint_setLength'>setLength</a> <a href='#SkPoint_Distance'>Distance</a> 477 478<a name='SkPoint_distanceToOrigin'></a> 479 480--- 481 482<pre style="padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0"> 483<a href='undocumented#SkScalar'>SkScalar</a> <a href='#SkPoint_distanceToOrigin'>distanceToOrigin</a>()const 484</pre> 485 486Returns the Euclidean distance from origin, computed as: 487 488<a href='undocumented#sqrt()'>sqrt</a>(<a href='#SkPoint_fX'>fX</a> * <a href='#SkPoint_fX'>fX</a> + <a href='#SkPoint_fY'>fY</a> * <a href='#SkPoint_fY'>fY</a>) 489 490. 491 492### Return Value 493 494straight-line distance to origin 495 496### Example 497 498<div><fiddle-embed name="812cf26d91b1cdcd2c6b9438a8172518"></fiddle-embed></div> 499 500### See Also 501 502<a href='#SkPoint_length'>length</a> <a href='#SkPoint_Length'>Length</a> <a href='#SkPoint_setLength'>setLength</a> <a href='#SkPoint_Distance'>Distance</a> 503 504<a name='SkPoint_normalize'></a> 505 506--- 507 508<pre style="padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0"> 509bool <a href='#SkPoint_normalize'>normalize()</a> 510</pre> 511 512Scales (<a href='#SkPoint_fX'>fX</a>, <a href='#SkPoint_fY'>fY</a>) so that <a href='#SkPoint_length'>length()</a> returns one, while preserving ratio of <a href='#SkPoint_fX'>fX</a> to <a href='#SkPoint_fY'>fY</a>, 513if possible. If prior length is nearly zero, sets <a href='SkPoint_Reference#Vector'>vector</a> to (0, 0) and returns 514false; otherwise returns true. 515 516### Return Value 517 518true if former length is not zero or nearly zero 519 520### Example 521 522<div><fiddle-embed name="d84fce292d86c7d9ef37ae2d179c03c7"></fiddle-embed></div> 523 524### See Also 525 526<a href='#SkPoint_Normalize'>Normalize</a> <a href='#SkPoint_setLength'>setLength</a> <a href='#SkPoint_length'>length</a> <a href='#SkPoint_Length'>Length</a> 527 528<a name='SkPoint_setNormalize'></a> 529 530--- 531 532<pre style="padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0"> 533bool <a href='#SkPoint_setNormalize'>setNormalize</a>(<a href='undocumented#SkScalar'>SkScalar</a> x, <a href='undocumented#SkScalar'>SkScalar</a> y) 534</pre> 535 536Sets <a href='SkPoint_Reference#Vector'>vector</a> to (<a href='#SkPoint_setNormalize_x'>x</a>, <a href='#SkPoint_setNormalize_y'>y</a>) scaled so <a href='#SkPoint_length'>length()</a> returns one, and so that 537(<a href='#SkPoint_fX'>fX</a>, <a href='#SkPoint_fY'>fY</a>) is proportional to (<a href='#SkPoint_setNormalize_x'>x</a>, <a href='#SkPoint_setNormalize_y'>y</a>). If (<a href='#SkPoint_setNormalize_x'>x</a>, <a href='#SkPoint_setNormalize_y'>y</a>) length is nearly zero, 538sets <a href='SkPoint_Reference#Vector'>vector</a> to (0, 0) and returns false; otherwise returns true. 539 540### Parameters 541 542<table> <tr> <td><a name='SkPoint_setNormalize_x'><code><strong>x</strong></code></a></td> 543 <td>proportional value for <a href='#SkPoint_fX'>fX</a></td> 544 </tr> 545 <tr> <td><a name='SkPoint_setNormalize_y'><code><strong>y</strong></code></a></td> 546 <td>proportional value for <a href='#SkPoint_fY'>fY</a></td> 547 </tr> 548</table> 549 550### Return Value 551 552true if (<a href='#SkPoint_setNormalize_x'>x</a>, <a href='#SkPoint_setNormalize_y'>y</a>) length is not zero or nearly zero 553 554### Example 555 556<div><fiddle-embed name="3e4f147d143a388802484bf0d26534c2"></fiddle-embed></div> 557 558### See Also 559 560<a href='#SkPoint_normalize'>normalize</a> <a href='#SkPoint_setLength'>setLength</a> 561 562<a name='SkPoint_setLength'></a> 563 564--- 565 566<pre style="padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0"> 567bool <a href='#SkPoint_setLength'>setLength</a>(<a href='undocumented#SkScalar'>SkScalar</a> length) 568</pre> 569 570Scales <a href='SkPoint_Reference#Vector'>vector</a> so that <a href='#SkPoint_distanceToOrigin'>distanceToOrigin</a>() returns <a href='#SkPoint_setLength_length'>length</a>, if possible. If former 571<a href='#SkPoint_setLength_length'>length</a> is nearly zero, sets <a href='SkPoint_Reference#Vector'>vector</a> to (0, 0) and return false; otherwise returns 572true. 573 574### Parameters 575 576<table> <tr> <td><a name='SkPoint_setLength_length'><code><strong>length</strong></code></a></td> 577 <td>straight-line distance to origin</td> 578 </tr> 579</table> 580 581### Return Value 582 583true if former <a href='#SkPoint_setLength_length'>length</a> is not zero or nearly zero 584 585### Example 586 587<div><fiddle-embed name="cbe7db206ece825aa3b9b7c3256aeaf0"></fiddle-embed></div> 588 589### See Also 590 591<a href='#SkPoint_setLength_length'>length</a> <a href='#SkPoint_Length'>Length</a> <a href='#SkPoint_setNormalize'>setNormalize</a> <a href='#SkPoint_setAbs'>setAbs</a> 592 593<a name='SkPoint_setLength_2'></a> 594 595--- 596 597<pre style="padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0"> 598bool <a href='#SkPoint_setLength'>setLength</a>(<a href='undocumented#SkScalar'>SkScalar</a> x, <a href='undocumented#SkScalar'>SkScalar</a> y, <a href='undocumented#SkScalar'>SkScalar</a> length) 599</pre> 600 601Sets <a href='SkPoint_Reference#Vector'>vector</a> to (<a href='#SkPoint_setLength_2_x'>x</a>, <a href='#SkPoint_setLength_2_y'>y</a>) scaled to <a href='#SkPoint_setLength_2_length'>length</a>, if possible. If former 602<a href='#SkPoint_setLength_2_length'>length</a> is nearly zero, sets <a href='SkPoint_Reference#Vector'>vector</a> to (0, 0) and return false; otherwise returns 603true. 604 605### Parameters 606 607<table> <tr> <td><a name='SkPoint_setLength_2_x'><code><strong>x</strong></code></a></td> 608 <td>proportional value for <a href='#SkPoint_fX'>fX</a></td> 609 </tr> 610 <tr> <td><a name='SkPoint_setLength_2_y'><code><strong>y</strong></code></a></td> 611 <td>proportional value for <a href='#SkPoint_fY'>fY</a></td> 612 </tr> 613 <tr> <td><a name='SkPoint_setLength_2_length'><code><strong>length</strong></code></a></td> 614 <td>straight-line distance to origin</td> 615 </tr> 616</table> 617 618### Return Value 619 620true if (<a href='#SkPoint_setLength_2_x'>x</a>, <a href='#SkPoint_setLength_2_y'>y</a>) <a href='#SkPoint_setLength_2_length'>length</a> is not zero or nearly zero 621 622### Example 623 624<div><fiddle-embed name="3cc0662b6fbbee1fe3442a0acfece22c"></fiddle-embed></div> 625 626### See Also 627 628<a href='#SkPoint_setLength_2_length'>length</a> <a href='#SkPoint_Length'>Length</a> <a href='#SkPoint_setNormalize'>setNormalize</a> <a href='#SkPoint_setAbs'>setAbs</a> 629 630<a name='SkPoint_scale'></a> 631 632--- 633 634<pre style="padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0"> 635void scale(<a href='undocumented#SkScalar'>SkScalar</a> scale, <a href='SkPoint_Reference#SkPoint'>SkPoint</a>* dst)const 636</pre> 637 638Sets <a href='#SkPoint_scale_dst'>dst</a> to <a href='SkPoint_Reference#SkPoint'>SkPoint</a> times <a href='#SkPoint_scale_scale'>scale</a>. <a href='#SkPoint_scale_dst'>dst</a> may be <a href='SkPoint_Reference#SkPoint'>SkPoint</a> to modify <a href='SkPoint_Reference#SkPoint'>SkPoint</a> in place. 639 640### Parameters 641 642<table> <tr> <td><a name='SkPoint_scale_scale'><code><strong>scale</strong></code></a></td> 643 <td>factor to multiply <a href='SkPoint_Reference#SkPoint'>SkPoint</a> by</td> 644 </tr> 645 <tr> <td><a name='SkPoint_scale_dst'><code><strong>dst</strong></code></a></td> 646 <td>storage for scaled <a href='SkPoint_Reference#SkPoint'>SkPoint</a></td> 647 </tr> 648</table> 649 650### Example 651 652<div><fiddle-embed name="972e4e230806281adb928e068bcd8551"></fiddle-embed></div> 653 654### See Also 655 656<a href='#SkPoint_multiply_operator'>operator*</a>(<a href='undocumented#SkScalar'>SkScalar</a> <a href='#SkPoint_scale_scale'>scale</a>) const <a href='#SkPoint_multiplyby_operator'>operator*=</a>(<a href='undocumented#SkScalar'>SkScalar</a> <a href='#SkPoint_scale_scale'>scale</a>) <a href='#SkPoint_setLength'>setLength</a> 657 658<a name='SkPoint_scale_2'></a> 659 660--- 661 662<pre style="padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0"> 663void scale(<a href='undocumented#SkScalar'>SkScalar</a> value) 664</pre> 665 666Scales <a href='SkPoint_Reference#SkPoint'>SkPoint</a> in place by scale. 667 668### Parameters 669 670<table> <tr> <td><a name='SkPoint_scale_2_value'><code><strong>value</strong></code></a></td> 671 <td>factor to multiply <a href='SkPoint_Reference#SkPoint'>SkPoint</a> by</td> 672 </tr> 673</table> 674 675### Example 676 677<div><fiddle-embed name="1060a4f27d8ef29519e6ac006ce90f2b"></fiddle-embed></div> 678 679### See Also 680 681<a href='#SkPoint_multiply_operator'>operator*</a>(<a href='undocumented#SkScalar'>SkScalar</a> <a href='#SkPoint_scale'>scale</a>) const <a href='#SkPoint_multiplyby_operator'>operator*=</a>(<a href='undocumented#SkScalar'>SkScalar</a> <a href='#SkPoint_scale'>scale</a>) <a href='#SkPoint_setLength'>setLength</a> 682 683<a name='SkPoint_negate'></a> 684 685--- 686 687<pre style="padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0"> 688void <a href='#SkPoint_negate'>negate()</a> 689</pre> 690 691Changes the sign of <a href='#SkPoint_fX'>fX</a> and <a href='#SkPoint_fY'>fY</a>. 692 693### Example 694 695<div><fiddle-embed name="312c0c8065ab5d0adfda80cccf2d11e6"> 696 697#### Example Output 698 699~~~~ 700pt: 0, -0 negate: -0, 0 701pt: -1, -2 negate: 1, 2 702pt: inf, -inf negate: -inf, inf 703pt: nan, -nan negate: -nan, nan 704~~~~ 705 706</fiddle-embed></div> 707 708### See Also 709 710operator-() const <a href='#SkPoint_setAbs'>setAbs</a> 711 712<a name='SkPoint_minus_operator'></a> 713 714--- 715 716<pre style="padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0"> 717<a href='SkPoint_Reference#SkPoint'>SkPoint</a> operator-()const 718</pre> 719 720Returns <a href='SkPoint_Reference#SkPoint'>SkPoint</a> changing the signs of <a href='#SkPoint_fX'>fX</a> and <a href='#SkPoint_fY'>fY</a>. 721 722### Return Value 723 724<a href='SkPoint_Reference#SkPoint'>SkPoint</a> as (-<a href='#SkPoint_fX'>fX</a>, -<a href='#SkPoint_fY'>fY</a>) 725 726### Example 727 728<div><fiddle-embed name="9baf247cfcd8272c0ddf6ce93f676b37"> 729 730#### Example Output 731 732~~~~ 733pt: 0, -0 negate: -0, 0 734pt: -1, -2 negate: 1, 2 735pt: inf, -inf negate: -inf, inf 736pt: nan, -nan negate: -nan, nan 737~~~~ 738 739</fiddle-embed></div> 740 741### See Also 742 743<a href='#SkPoint_negate'>negate</a> <a href='#SkPoint_subtract_operator'>operator-</a>(const <a href='SkPoint_Reference#SkPoint'>SkPoint</a>& a, const <a href='SkPoint_Reference#SkPoint'>SkPoint</a>& b) <a href='#SkPoint_subtractfrom_operator'>operator-=</a>(const <a href='SkPoint_Reference#SkVector'>SkVector</a>& v) <a href='SkIPoint_Reference#SkIPoint'>SkIPoint</a>::operator-() const 744 745<a name='SkPoint_addto_operator'></a> 746 747--- 748 749<pre style="padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0"> 750void <a href='#SkPoint_addto_operator'>operator+=</a>(const <a href='SkPoint_Reference#SkVector'>SkVector</a>& v) 751</pre> 752 753Adds <a href='SkPoint_Reference#Vector'>Vector</a> <a href='#SkPoint_addto_operator_v'>v</a> to <a href='SkPoint_Reference#Point'>Point</a>. Sets <a href='SkPoint_Reference#Point'>Point</a> to: <code>(<a href='#SkPoint_fX'>fX</a> + <a href='#SkPoint_addto_operator_v'>v</a>.<a href='#SkPoint_fX'>fX</a>, <a href='#SkPoint_fY'>fY</a> + <a href='#SkPoint_addto_operator_v'>v</a>.<a href='#SkPoint_fY'>fY</a>)</code>. 754 755### Parameters 756 757<table> <tr> <td><a name='SkPoint_addto_operator_v'><code><strong>v</strong></code></a></td> 758 <td><a href='SkPoint_Reference#Vector'>Vector</a> to add</td> 759 </tr> 760</table> 761 762### Example 763 764<div><fiddle-embed name="8b4e79109e2381345258cb744881b20c"></fiddle-embed></div> 765 766### See Also 767 768<a href='#SkPoint_offset'>offset()</a> <a href='#SkPoint_add_operator'>operator+</a>(const <a href='SkPoint_Reference#SkPoint'>SkPoint</a>& a, const <a href='SkPoint_Reference#SkVector'>SkVector</a>& b) <a href='SkIPoint_Reference#SkIPoint'>SkIPoint</a>::operator+=(const <a href='SkIPoint_Reference#SkIVector'>SkIVector</a>& <a href='#SkPoint_addto_operator_v'>v</a>) 769 770<a name='SkPoint_subtractfrom_operator'></a> 771 772--- 773 774<pre style="padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0"> 775void <a href='#SkPoint_subtractfrom_operator'>operator-=</a>(const <a href='SkPoint_Reference#SkVector'>SkVector</a>& v) 776</pre> 777 778Subtracts <a href='SkPoint_Reference#Vector'>Vector</a> <a href='#SkPoint_subtractfrom_operator_v'>v</a> from <a href='SkPoint_Reference#Point'>Point</a>. Sets <a href='SkPoint_Reference#Point'>Point</a> to: <code>(<a href='#SkPoint_fX'>fX</a> - <a href='#SkPoint_subtractfrom_operator_v'>v</a>.<a href='#SkPoint_fX'>fX</a>, <a href='#SkPoint_fY'>fY</a> - <a href='#SkPoint_subtractfrom_operator_v'>v</a>.<a href='#SkPoint_fY'>fY</a>)</code>. 779 780### Parameters 781 782<table> <tr> <td><a name='SkPoint_subtractfrom_operator_v'><code><strong>v</strong></code></a></td> 783 <td><a href='SkPoint_Reference#Vector'>Vector</a> to subtract</td> 784 </tr> 785</table> 786 787### Example 788 789<div><fiddle-embed name="86c0399704d8dff4091bf87b8d87d40b"></fiddle-embed></div> 790 791### See Also 792 793<a href='#SkPoint_offset'>offset()</a> <a href='#SkPoint_subtract_operator'>operator-</a>(const <a href='SkPoint_Reference#SkPoint'>SkPoint</a>& a, const <a href='SkPoint_Reference#SkPoint'>SkPoint</a>& b) <a href='SkIPoint_Reference#SkIPoint'>SkIPoint</a>::operator-=(const <a href='SkIPoint_Reference#SkIVector'>SkIVector</a>& <a href='#SkPoint_subtractfrom_operator_v'>v</a>) 794 795<a name='SkPoint_multiply_operator'></a> 796 797--- 798 799<pre style="padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0"> 800<a href='SkPoint_Reference#SkPoint'>SkPoint</a> operator*(<a href='undocumented#SkScalar'>SkScalar</a> scale)const 801</pre> 802 803Returns <a href='SkPoint_Reference#SkPoint'>SkPoint</a> multiplied by <a href='#SkPoint_multiply_operator_scale'>scale</a>. 804 805### Parameters 806 807<table> <tr> <td><a name='SkPoint_multiply_operator_scale'><code><strong>scale</strong></code></a></td> 808 <td><a href='undocumented#Scalar'>scalar</a> to multiply by</td> 809 </tr> 810</table> 811 812### Return Value 813 814<a href='SkPoint_Reference#SkPoint'>SkPoint</a> as (<a href='#SkPoint_fX'>fX</a> * <a href='#SkPoint_multiply_operator_scale'>scale</a>, <a href='#SkPoint_fY'>fY</a> * <a href='#SkPoint_multiply_operator_scale'>scale</a>) 815 816### Example 817 818<div><fiddle-embed name="35b3bc675779de043706ae4817ee950c"></fiddle-embed></div> 819 820### See Also 821 822<a href='#SkPoint_multiplyby_operator'>operator*=</a>(<a href='undocumented#SkScalar'>SkScalar</a> <a href='#SkPoint_multiply_operator_scale'>scale</a>) <a href='#SkPoint_scale'>scale()</a> <a href='#SkPoint_setLength'>setLength</a> <a href='#SkPoint_setNormalize'>setNormalize</a> 823 824<a name='SkPoint_multiplyby_operator'></a> 825 826--- 827 828<pre style="padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0"> 829<a href='SkPoint_Reference#SkPoint'>SkPoint</a>& <a href='#SkPoint_multiplyby_operator'>operator*=</a>(<a href='undocumented#SkScalar'>SkScalar</a> scale) 830</pre> 831 832Multiplies <a href='SkPoint_Reference#Point'>Point</a> by <a href='#SkPoint_multiplyby_operator_scale'>scale</a>. Sets <a href='SkPoint_Reference#Point'>Point</a> to: <code>(<a href='#SkPoint_fX'>fX</a> * <a href='#SkPoint_multiplyby_operator_scale'>scale</a>, <a href='#SkPoint_fY'>fY</a> * <a href='#SkPoint_multiplyby_operator_scale'>scale</a>)</code>. 833 834### Parameters 835 836<table> <tr> <td><a name='SkPoint_multiplyby_operator_scale'><code><strong>scale</strong></code></a></td> 837 <td><a href='undocumented#Scalar'>Scalar</a> to multiply by</td> 838 </tr> 839</table> 840 841### Return Value 842 843reference to <a href='SkPoint_Reference#Point'>Point</a> 844 845### Example 846 847<div><fiddle-embed name="3ce3db36235d80dbac4d39504cf756da"></fiddle-embed></div> 848 849### See Also 850 851<a href='#SkPoint_multiply_operator'>operator*</a>(<a href='undocumented#SkScalar'>SkScalar</a> <a href='#SkPoint_multiplyby_operator_scale'>scale</a>) const <a href='#SkPoint_scale'>scale()</a> <a href='#SkPoint_setLength'>setLength</a> <a href='#SkPoint_setNormalize'>setNormalize</a> 852 853<a name='SkPoint_isFinite'></a> 854 855--- 856 857<pre style="padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0"> 858bool <a href='#SkPoint_isFinite'>isFinite</a>()const 859</pre> 860 861Returns true if both <a href='#SkPoint_fX'>fX</a> and <a href='#SkPoint_fY'>fY</a> are measurable values. 862 863### Return Value 864 865true for values other than infinities and NaN 866 867### Example 868 869<div><fiddle-embed name="937cc166cc0e220f33fb82501141d0b3"> 870 871#### Example Output 872 873~~~~ 874pt: 0, -0 finite: true 875pt: -1, -2 finite: true 876pt: inf, 1 finite: false 877pt: nan, -1 finite: false 878~~~~ 879 880</fiddle-embed></div> 881 882### See Also 883 884<a href='SkRect_Reference#SkRect'>SkRect</a>::<a href='#SkRect_isFinite'>isFinite</a> <a href='SkPath_Reference#SkPath'>SkPath</a>::<a href='#SkPath_isFinite'>isFinite</a> 885 886<a name='SkPoint_equals'></a> 887 888--- 889 890<pre style="padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0"> 891bool equals(<a href='undocumented#SkScalar'>SkScalar</a> x, <a href='undocumented#SkScalar'>SkScalar</a> y)const 892</pre> 893 894Returns true if <a href='SkPoint_Reference#SkPoint'>SkPoint</a> is equivalent to <a href='SkPoint_Reference#SkPoint'>SkPoint</a> constructed from (<a href='#SkPoint_equals_x'>x</a>, <a href='#SkPoint_equals_y'>y</a>). 895 896### Parameters 897 898<table> <tr> <td><a name='SkPoint_equals_x'><code><strong>x</strong></code></a></td> 899 <td>value compared with <a href='#SkPoint_fX'>fX</a></td> 900 </tr> 901 <tr> <td><a name='SkPoint_equals_y'><code><strong>y</strong></code></a></td> 902 <td>value compared with <a href='#SkPoint_fY'>fY</a></td> 903 </tr> 904</table> 905 906### Return Value 907 908true if <a href='SkPoint_Reference#SkPoint'>SkPoint</a> equals (<a href='#SkPoint_equals_x'>x</a>, <a href='#SkPoint_equals_y'>y</a>) 909 910### Example 911 912<div><fiddle-embed name="4cecb878c8b66beffda051f26c00f817"> 913 914#### Example Output 915 916~~~~ 917pt: 0, -0 == pt 918pt: -1, -2 == pt 919pt: inf, 1 == pt 920pt: nan, -1 != pt 921~~~~ 922 923</fiddle-embed></div> 924 925### See Also 926 927<a href='#SkPoint_equal_operator'>operator==</a>(const <a href='SkPoint_Reference#SkPoint'>SkPoint</a>& a, const <a href='SkPoint_Reference#SkPoint'>SkPoint</a>& b) 928 929<a name='SkPoint_equal_operator'></a> 930 931--- 932 933<pre style="padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0"> 934bool <a href='#SkPoint_equal_operator'>operator==</a>(const <a href='SkPoint_Reference#SkPoint'>SkPoint</a>& a, const <a href='SkPoint_Reference#SkPoint'>SkPoint</a>& b) 935</pre> 936 937Returns true if <a href='#SkPoint_equal_operator_a'>a</a> is equivalent to <a href='#SkPoint_equal_operator_b'>b</a>. 938 939### Parameters 940 941<table> <tr> <td><a name='SkPoint_equal_operator_a'><code><strong>a</strong></code></a></td> 942 <td><a href='SkPoint_Reference#SkPoint'>SkPoint</a> to compare</td> 943 </tr> 944 <tr> <td><a name='SkPoint_equal_operator_b'><code><strong>b</strong></code></a></td> 945 <td><a href='SkPoint_Reference#SkPoint'>SkPoint</a> to compare</td> 946 </tr> 947</table> 948 949### Return Value 950 951true if <a href='#SkPoint_equal_operator_a'>a</a>.<a href='#SkPoint_fX'>fX</a> == <a href='#SkPoint_equal_operator_b'>b</a>.<a href='#SkPoint_fX'>fX</a> and <a href='#SkPoint_equal_operator_a'>a</a>.<a href='#SkPoint_fY'>fY</a> == <a href='#SkPoint_equal_operator_b'>b</a>.<a href='#SkPoint_fY'>fY</a> 952 953### Example 954 955<div><fiddle-embed name="741f793334a48a35dadf4310d7ea52cb"> 956 957#### Example Output 958 959~~~~ 960pt: 0, -0 == pt 961pt: -1, -2 == pt 962pt: inf, 1 == pt 963pt: nan, -1 != pt 964~~~~ 965 966</fiddle-embed></div> 967 968### See Also 969 970<a href='#SkPoint_equals'>equals()</a> <a href='#SkPoint_notequal_operator'>operator!=</a>(const <a href='SkPoint_Reference#SkPoint'>SkPoint</a>& <a href='#SkPoint_equal_operator_a'>a</a>, const <a href='SkPoint_Reference#SkPoint'>SkPoint</a>& <a href='#SkPoint_equal_operator_b'>b</a>) 971 972<a name='SkPoint_notequal_operator'></a> 973 974--- 975 976<pre style="padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0"> 977bool <a href='#SkPoint_notequal_operator'>operator!=</a>(const <a href='SkPoint_Reference#SkPoint'>SkPoint</a>& a, const <a href='SkPoint_Reference#SkPoint'>SkPoint</a>& b) 978</pre> 979 980Returns true if <a href='#SkPoint_notequal_operator_a'>a</a> is not equivalent to <a href='#SkPoint_notequal_operator_b'>b</a>. 981 982### Parameters 983 984<table> <tr> <td><a name='SkPoint_notequal_operator_a'><code><strong>a</strong></code></a></td> 985 <td><a href='SkPoint_Reference#SkPoint'>SkPoint</a> to compare</td> 986 </tr> 987 <tr> <td><a name='SkPoint_notequal_operator_b'><code><strong>b</strong></code></a></td> 988 <td><a href='SkPoint_Reference#SkPoint'>SkPoint</a> to compare</td> 989 </tr> 990</table> 991 992### Return Value 993 994true if <a href='#SkPoint_notequal_operator_a'>a</a>.<a href='#SkPoint_fX'>fX</a> != <a href='#SkPoint_notequal_operator_b'>b</a>.<a href='#SkPoint_fX'>fX</a> or <a href='#SkPoint_notequal_operator_a'>a</a>.<a href='#SkPoint_fY'>fY</a> != <a href='#SkPoint_notequal_operator_b'>b</a>.<a href='#SkPoint_fY'>fY</a> 995 996### Example 997 998<div><fiddle-embed name="8fe8572685eaa617f25a5a6767a874dc"> 999 1000#### Example Output 1001 1002~~~~ 1003pt: 0, -0 == pt 1004pt: -1, -2 == pt 1005pt: inf, 1 == pt 1006pt: nan, -1 != pt 1007~~~~ 1008 1009</fiddle-embed></div> 1010 1011### See Also 1012 1013<a href='#SkPoint_equal_operator'>operator==</a>(const <a href='SkPoint_Reference#SkPoint'>SkPoint</a>& <a href='#SkPoint_notequal_operator_a'>a</a>, const <a href='SkPoint_Reference#SkPoint'>SkPoint</a>& <a href='#SkPoint_notequal_operator_b'>b</a>) <a href='#SkPoint_equals'>equals()</a> 1014 1015<a name='SkPoint_subtract_operator'></a> 1016 1017--- 1018 1019<pre style="padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0"> 1020<a href='SkPoint_Reference#SkVector'>SkVector</a> <a href='#SkPoint_subtract_operator'>operator-</a>(const <a href='SkPoint_Reference#SkPoint'>SkPoint</a>& a, const <a href='SkPoint_Reference#SkPoint'>SkPoint</a>& b) 1021</pre> 1022 1023Returns <a href='SkPoint_Reference#Vector'>Vector</a> from <a href='#SkPoint_subtract_operator_b'>b</a> to <a href='#SkPoint_subtract_operator_a'>a</a>, computed as <code>(<a href='#SkPoint_subtract_operator_a'>a</a>.<a href='#SkPoint_fX'>fX</a> - <a href='#SkPoint_subtract_operator_b'>b</a>.<a href='#SkPoint_fX'>fX</a>, <a href='#SkPoint_subtract_operator_a'>a</a>.<a href='#SkPoint_fY'>fY</a> - <a href='#SkPoint_subtract_operator_b'>b</a>.<a href='#SkPoint_fY'>fY</a>)</code>. 1024 1025Can also be used to subtract <a href='SkPoint_Reference#Vector'>Vector</a> from <a href='SkPoint_Reference#Point'>Point</a>, returning <a href='SkPoint_Reference#Point'>Point</a>. 1026Can also be used to subtract <a href='SkPoint_Reference#Vector'>Vector</a> from <a href='SkPoint_Reference#Vector'>Vector</a>, returning <a href='SkPoint_Reference#Vector'>Vector</a>. 1027 1028### Parameters 1029 1030<table> <tr> <td><a name='SkPoint_subtract_operator_a'><code><strong>a</strong></code></a></td> 1031 <td><a href='SkPoint_Reference#Point'>Point</a> to subtract from</td> 1032 </tr> 1033 <tr> <td><a name='SkPoint_subtract_operator_b'><code><strong>b</strong></code></a></td> 1034 <td><a href='SkPoint_Reference#Point'>Point</a> to subtract</td> 1035 </tr> 1036</table> 1037 1038### Return Value 1039 1040<a href='SkPoint_Reference#Vector'>Vector</a> from <a href='#SkPoint_subtract_operator_b'>b</a> to <a href='#SkPoint_subtract_operator_a'>a</a> 1041 1042### Example 1043 1044<div><fiddle-embed name="b6c4943ecd0b2dccf9d220b8944009e0"></fiddle-embed></div> 1045 1046### See Also 1047 1048<a href='#SkPoint_subtractfrom_operator'>operator-=</a>(const <a href='SkPoint_Reference#SkVector'>SkVector</a>& v) <a href='#SkPoint_offset'>offset()</a> 1049 1050<a name='SkPoint_add_operator'></a> 1051 1052--- 1053 1054<pre style="padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0"> 1055<a href='SkPoint_Reference#SkPoint'>SkPoint</a> <a href='#SkPoint_add_operator'>operator+</a>(const <a href='SkPoint_Reference#SkPoint'>SkPoint</a>& a, const <a href='SkPoint_Reference#SkVector'>SkVector</a>& b) 1056</pre> 1057 1058Returns <a href='SkPoint_Reference#Point'>Point</a> resulting from <a href='SkPoint_Reference#Point'>Point</a> <a href='#SkPoint_add_operator_a'>a</a> offset by <a href='SkPoint_Reference#Vector'>Vector</a> <a href='#SkPoint_add_operator_b'>b</a>, computed as: 1059<code>(<a href='#SkPoint_add_operator_a'>a</a>.<a href='#SkPoint_fX'>fX</a> + <a href='#SkPoint_add_operator_b'>b</a>.<a href='#SkPoint_fX'>fX</a>, <a href='#SkPoint_add_operator_a'>a</a>.<a href='#SkPoint_fY'>fY</a> + <a href='#SkPoint_add_operator_b'>b</a>.<a href='#SkPoint_fY'>fY</a>)</code>. 1060 1061Can also be used to offset <a href='SkPoint_Reference#Point'>Point</a> <a href='#SkPoint_add_operator_b'>b</a> by <a href='SkPoint_Reference#Vector'>Vector</a> <a href='#SkPoint_add_operator_a'>a</a>, returning <a href='SkPoint_Reference#Point'>Point</a>. 1062Can also be used to add <a href='SkPoint_Reference#Vector'>Vector</a> to <a href='SkPoint_Reference#Vector'>Vector</a>, returning <a href='SkPoint_Reference#Vector'>Vector</a>. 1063 1064### Parameters 1065 1066<table> <tr> <td><a name='SkPoint_add_operator_a'><code><strong>a</strong></code></a></td> 1067 <td><a href='SkPoint_Reference#Point'>Point</a> or <a href='SkPoint_Reference#Vector'>Vector</a> to add to</td> 1068 </tr> 1069 <tr> <td><a name='SkPoint_add_operator_b'><code><strong>b</strong></code></a></td> 1070 <td><a href='SkPoint_Reference#Point'>Point</a> or <a href='SkPoint_Reference#Vector'>Vector</a> to add</td> 1071 </tr> 1072</table> 1073 1074### Return Value 1075 1076<a href='SkPoint_Reference#Point'>Point</a> equal to <a href='#SkPoint_add_operator_a'>a</a> offset by <a href='#SkPoint_add_operator_b'>b</a> 1077 1078### Example 1079 1080<div><fiddle-embed name="911a84253dfec4dabf94dbe3c71766f0"></fiddle-embed></div> 1081 1082### See Also 1083 1084<a href='#SkPoint_addto_operator'>operator+=</a>(const <a href='SkPoint_Reference#SkVector'>SkVector</a>& v) <a href='#SkPoint_offset'>offset()</a> 1085 1086<a name='SkPoint_Length'></a> 1087 1088--- 1089 1090<pre style="padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0"> 1091static <a href='undocumented#SkScalar'>SkScalar</a> <a href='#SkPoint_Length'>Length</a>(<a href='undocumented#SkScalar'>SkScalar</a> x, <a href='undocumented#SkScalar'>SkScalar</a> y) 1092</pre> 1093 1094Returns the <a href='undocumented#Euclidean_Distance'>Euclidean distance</a> from origin, computed as: 1095 1096<a href='undocumented#sqrt()'>sqrt</a>(<a href='#SkPoint_Length_x'>x</a> * <a href='#SkPoint_Length_x'>x</a> + <a href='#SkPoint_Length_y'>y</a> * <a href='#SkPoint_Length_y'>y</a>) 1097 1098. 1099 1100### Parameters 1101 1102<table> <tr> <td><a name='SkPoint_Length_x'><code><strong>x</strong></code></a></td> 1103 <td>component of length</td> 1104 </tr> 1105 <tr> <td><a name='SkPoint_Length_y'><code><strong>y</strong></code></a></td> 1106 <td>component of length</td> 1107 </tr> 1108</table> 1109 1110### Return Value 1111 1112straight-line distance to origin 1113 1114### Example 1115 1116<div><fiddle-embed name="c98773d8b4509969d78cb8121e4b77f6"></fiddle-embed></div> 1117 1118### See Also 1119 1120<a href='#SkPoint_length'>length()</a> <a href='#SkPoint_Distance'>Distance</a> <a href='#SkPoint_setLength'>setLength</a> 1121 1122<a name='SkPoint_Normalize'></a> 1123 1124--- 1125 1126<pre style="padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0"> 1127static <a href='undocumented#SkScalar'>SkScalar</a> <a href='#SkPoint_Normalize'>Normalize</a>(<a href='SkPoint_Reference#SkVector'>SkVector</a>* vec) 1128</pre> 1129 1130Scales (<a href='#SkPoint_Normalize_vec'>vec</a>-><a href='#SkPoint_fX'>fX</a>, <a href='#SkPoint_Normalize_vec'>vec</a>-><a href='#SkPoint_fY'>fY</a>) so that <a href='#SkPoint_length'>length()</a> returns one, while preserving ratio of <a href='#SkPoint_Normalize_vec'>vec</a>-><a href='#SkPoint_fX'>fX</a> 1131to <a href='#SkPoint_Normalize_vec'>vec</a>-><a href='#SkPoint_fY'>fY</a>, if possible. If original length is nearly zero, sets <a href='#SkPoint_Normalize_vec'>vec</a> to (0, 0) and returns 1132zero; otherwise, returns length of <a href='#SkPoint_Normalize_vec'>vec</a> before <a href='#SkPoint_Normalize_vec'>vec</a> is scaled. 1133 1134Returned prior length may be <a href='undocumented#SK_ScalarInfinity'>SK_ScalarInfinity</a> if it can not be represented by <a href='undocumented#SkScalar'>SkScalar</a>. 1135 1136Note that <a href='#SkPoint_normalize'>normalize()</a> is faster if prior length is not required. 1137 1138### Parameters 1139 1140<table> <tr> <td><a name='SkPoint_Normalize_vec'><code><strong>vec</strong></code></a></td> 1141 <td>normalized to unit length</td> 1142 </tr> 1143</table> 1144 1145### Return Value 1146 1147original <a href='#SkPoint_Normalize_vec'>vec</a> length 1148 1149### Example 1150 1151<div><fiddle-embed name="60a08f3ce75374fc815384616d114df7"></fiddle-embed></div> 1152 1153### See Also 1154 1155<a href='#SkPoint_normalize'>normalize()</a> <a href='#SkPoint_setLength'>setLength</a> <a href='#SkPoint_Length'>Length</a> 1156 1157<a name='SkPoint_Distance'></a> 1158 1159--- 1160 1161<pre style="padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0"> 1162static <a href='undocumented#SkScalar'>SkScalar</a> <a href='#SkPoint_Distance'>Distance</a>(const <a href='SkPoint_Reference#SkPoint'>SkPoint</a>& a, const <a href='SkPoint_Reference#SkPoint'>SkPoint</a>& b) 1163</pre> 1164 1165Returns the <a href='undocumented#Euclidean_Distance'>Euclidean distance</a> between <a href='#SkPoint_Distance_a'>a</a> and <a href='#SkPoint_Distance_b'>b</a>. 1166 1167### Parameters 1168 1169<table> <tr> <td><a name='SkPoint_Distance_a'><code><strong>a</strong></code></a></td> 1170 <td><a href='undocumented#Line'>line</a> end <a href='SkPoint_Reference#Point'>point</a></td> 1171 </tr> 1172 <tr> <td><a name='SkPoint_Distance_b'><code><strong>b</strong></code></a></td> 1173 <td><a href='undocumented#Line'>line</a> end <a href='SkPoint_Reference#Point'>point</a></td> 1174 </tr> 1175</table> 1176 1177### Return Value 1178 1179straight-line distance from <a href='#SkPoint_Distance_a'>a</a> to <a href='#SkPoint_Distance_b'>b</a> 1180 1181### Example 1182 1183<div><fiddle-embed name="9e0a2de2eb94dba4521d733e73f2bda5"></fiddle-embed></div> 1184 1185### See Also 1186 1187<a href='#SkPoint_length'>length()</a> <a href='#SkPoint_setLength'>setLength</a> 1188 1189<a name='SkPoint_DotProduct'></a> 1190 1191--- 1192 1193<pre style="padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0"> 1194static <a href='undocumented#SkScalar'>SkScalar</a> <a href='#SkPoint_DotProduct'>DotProduct</a>(const <a href='SkPoint_Reference#SkVector'>SkVector</a>& a, const <a href='SkPoint_Reference#SkVector'>SkVector</a>& b) 1195</pre> 1196 1197Returns the dot product of <a href='SkPoint_Reference#Vector'>vector</a> <a href='#SkPoint_DotProduct_a'>a</a> and <a href='SkPoint_Reference#Vector'>vector</a> <a href='#SkPoint_DotProduct_b'>b</a>. 1198 1199### Parameters 1200 1201<table> <tr> <td><a name='SkPoint_DotProduct_a'><code><strong>a</strong></code></a></td> 1202 <td>left side of dot product</td> 1203 </tr> 1204 <tr> <td><a name='SkPoint_DotProduct_b'><code><strong>b</strong></code></a></td> 1205 <td>right side of dot product</td> 1206 </tr> 1207</table> 1208 1209### Return Value 1210 1211product of input magnitudes and cosine of the angle between them 1212 1213### Example 1214 1215<div><fiddle-embed name="496db0131a003162faba7d7f98b30340"></fiddle-embed></div> 1216 1217### See Also 1218 1219<a href='#SkPoint_dot'>dot</a> <a href='#SkPoint_CrossProduct'>CrossProduct</a> 1220 1221<a name='SkPoint_CrossProduct'></a> 1222 1223--- 1224 1225<pre style="padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0"> 1226static <a href='undocumented#SkScalar'>SkScalar</a> <a href='#SkPoint_CrossProduct'>CrossProduct</a>(const <a href='SkPoint_Reference#SkVector'>SkVector</a>& a, const <a href='SkPoint_Reference#SkVector'>SkVector</a>& b) 1227</pre> 1228 1229Returns the cross product of <a href='SkPoint_Reference#Vector'>vector</a> <a href='#SkPoint_CrossProduct_a'>a</a> and <a href='SkPoint_Reference#Vector'>vector</a> <a href='#SkPoint_CrossProduct_b'>b</a>. 1230 1231<a href='#SkPoint_CrossProduct_a'>a</a> and <a href='#SkPoint_CrossProduct_b'>b</a> form three-dimensional <a href='SkPoint_Reference#Vector'>vectors</a> with z-axis value equal to zero. The 1232cross product is <a href='#SkPoint_CrossProduct_a'>a</a> three-dimensional <a href='SkPoint_Reference#Vector'>vector</a> with x-axis and y-axis values equal 1233to zero. The cross product z-axis component is returned. 1234 1235### Parameters 1236 1237<table> <tr> <td><a name='SkPoint_CrossProduct_a'><code><strong>a</strong></code></a></td> 1238 <td>left side of cross product</td> 1239 </tr> 1240 <tr> <td><a name='SkPoint_CrossProduct_b'><code><strong>b</strong></code></a></td> 1241 <td>right side of cross product</td> 1242 </tr> 1243</table> 1244 1245### Return Value 1246 1247area spanned by <a href='SkPoint_Reference#Vector'>vectors</a> signed by angle direction 1248 1249### Example 1250 1251<div><fiddle-embed name="8b8a4cd8a29d22bb9c5e63b70357bd65"></fiddle-embed></div> 1252 1253### See Also 1254 1255<a href='#SkPoint_cross'>cross</a> <a href='#SkPoint_DotProduct'>DotProduct</a> 1256 1257<a name='SkPoint_cross'></a> 1258 1259--- 1260 1261<pre style="padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0"> 1262<a href='undocumented#SkScalar'>SkScalar</a> cross(const <a href='SkPoint_Reference#SkVector'>SkVector</a>& vec)const 1263</pre> 1264 1265Returns the cross product of <a href='SkPoint_Reference#Vector'>vector</a> and <a href='#SkPoint_cross_vec'>vec</a>. 1266 1267<a href='SkPoint_Reference#Vector'>Vector</a> and <a href='#SkPoint_cross_vec'>vec</a> form three-dimensional <a href='SkPoint_Reference#Vector'>vectors</a> with z-axis value equal to zero. 1268The cross product is a three-dimensional <a href='SkPoint_Reference#Vector'>vector</a> with x-axis and y-axis values 1269equal to zero. The cross product z-axis component is returned. 1270 1271### Parameters 1272 1273<table> <tr> <td><a name='SkPoint_cross_vec'><code><strong>vec</strong></code></a></td> 1274 <td>right side of cross product</td> 1275 </tr> 1276</table> 1277 1278### Return Value 1279 1280area spanned by <a href='SkPoint_Reference#Vector'>vectors</a> signed by angle direction 1281 1282### Example 1283 1284<div><fiddle-embed name="0bc7b3997357e499817278b78bdfbf1d"></fiddle-embed></div> 1285 1286### See Also 1287 1288<a href='#SkPoint_CrossProduct'>CrossProduct</a> <a href='#SkPoint_dot'>dot</a> 1289 1290<a name='SkPoint_dot'></a> 1291 1292--- 1293 1294<pre style="padding: 1em 1em 1em 1em; width: 62.5em;background-color: #f0f0f0"> 1295<a href='undocumented#SkScalar'>SkScalar</a> dot(const <a href='SkPoint_Reference#SkVector'>SkVector</a>& vec)const 1296</pre> 1297 1298Returns the dot product of <a href='SkPoint_Reference#Vector'>vector</a> and <a href='SkPoint_Reference#Vector'>vector</a> <a href='#SkPoint_dot_vec'>vec</a>. 1299 1300### Parameters 1301 1302<table> <tr> <td><a name='SkPoint_dot_vec'><code><strong>vec</strong></code></a></td> 1303 <td>right side of dot product</td> 1304 </tr> 1305</table> 1306 1307### Return Value 1308 1309product of input magnitudes and cosine of the angle between them 1310 1311### Example 1312 1313<div><fiddle-embed name="56d01ccfedd71d3c504b09afa2875d38"></fiddle-embed></div> 1314 1315### See Also 1316 1317<a href='#SkPoint_DotProduct'>DotProduct</a> <a href='#SkPoint_cross'>cross</a> 1318 1319<a name='Vector'></a> 1320 1321<a name='SkVector'></a> 1322 1323--- 1324 1325<pre style="padding: 1em 1em 1em 1em;width: 62.5em; background-color: #f0f0f0"> 1326 typedef <a href='SkPoint_Reference#SkPoint'>SkPoint</a> <a href='SkPoint_Reference#SkVector'>SkVector</a>; 1327</pre> 1328 1329<a href='SkPoint_Reference#SkVector'>SkVector</a> provides an alternative name for <a href='SkPoint_Reference#SkPoint'>SkPoint</a>. <a href='SkPoint_Reference#SkVector'>SkVector</a> and <a href='SkPoint_Reference#SkPoint'>SkPoint</a> can 1330be used interchangeably for all purposes.