Cary Clark | a560c47 | 2017-11-27 10:44:06 -0500 | [diff] [blame] | 1 | #Topic IPoint16 |
| 2 | #Alias IPoint16_Reference |
| 3 | |
Cary Clark | 08895c4 | 2018-02-01 09:37:32 -0500 | [diff] [blame] | 4 | #Subtopic Overview |
| 5 | #Subtopic Subtopics |
| 6 | #Populate |
| 7 | ## |
| 8 | ## |
| 9 | |
Cary Clark | a560c47 | 2017-11-27 10:44:06 -0500 | [diff] [blame] | 10 | #Struct SkIPoint16 |
| 11 | |
Cary Clark | ab2621d | 2018-01-30 10:08:57 -0500 | [diff] [blame] | 12 | SkIPoint16 holds two 16 bit integer coordinates. |
Cary Clark | a560c47 | 2017-11-27 10:44:06 -0500 | [diff] [blame] | 13 | |
Cary Clark | 5081eed | 2018-01-22 07:55:48 -0500 | [diff] [blame] | 14 | #Subtopic Constructors |
Cary Clark | 08895c4 | 2018-02-01 09:37:32 -0500 | [diff] [blame] | 15 | #Populate |
| 16 | ## |
Cary Clark | a560c47 | 2017-11-27 10:44:06 -0500 | [diff] [blame] | 17 | |
| 18 | #Subtopic Member_Functions |
Cary Clark | 08895c4 | 2018-02-01 09:37:32 -0500 | [diff] [blame] | 19 | #Populate |
| 20 | ## |
Cary Clark | a560c47 | 2017-11-27 10:44:06 -0500 | [diff] [blame] | 21 | |
Cary Clark | 08895c4 | 2018-02-01 09:37:32 -0500 | [diff] [blame] | 22 | #Subtopic Members |
| 23 | #Populate |
Cary Clark | a560c47 | 2017-11-27 10:44:06 -0500 | [diff] [blame] | 24 | |
| 25 | #Member int16_t fX |
Cary Clark | 08895c4 | 2018-02-01 09:37:32 -0500 | [diff] [blame] | 26 | #Line # x-axis value ## |
Cary Clark | 5081eed | 2018-01-22 07:55:48 -0500 | [diff] [blame] | 27 | x-axis value used by IPoint16 |
Cary Clark | a560c47 | 2017-11-27 10:44:06 -0500 | [diff] [blame] | 28 | ## |
| 29 | |
| 30 | #Member int16_t fY |
Cary Clark | 08895c4 | 2018-02-01 09:37:32 -0500 | [diff] [blame] | 31 | #Line # y-axis value ## |
Cary Clark | 5081eed | 2018-01-22 07:55:48 -0500 | [diff] [blame] | 32 | y-axis value used by IPoint16 |
Cary Clark | a560c47 | 2017-11-27 10:44:06 -0500 | [diff] [blame] | 33 | ## |
| 34 | |
Cary Clark | 08895c4 | 2018-02-01 09:37:32 -0500 | [diff] [blame] | 35 | #Subtopic Members ## |
| 36 | |
Cary Clark | a560c47 | 2017-11-27 10:44:06 -0500 | [diff] [blame] | 37 | # ------------------------------------------------------------------------------ |
| 38 | |
| 39 | #Method static constexpr SkIPoint16 Make(int x, int y) |
| 40 | |
Cary Clark | ab2621d | 2018-01-30 10:08:57 -0500 | [diff] [blame] | 41 | #Line # constructs from integer inputs ## |
Cary Clark | a560c47 | 2017-11-27 10:44:06 -0500 | [diff] [blame] | 42 | Sets fX to x, fY to y. If SK_DEBUG is defined, asserts |
| 43 | if x or y does not fit in 16 bits. |
| 44 | |
| 45 | #Param x integer x-axis value of constructed IPoint ## |
| 46 | #Param y integer y-axis value of constructed IPoint ## |
| 47 | |
| 48 | #Return IPoint16 (x, y) ## |
| 49 | |
| 50 | #Example |
| 51 | SkIPoint16 pt1 = {45, 66}; |
| 52 | SkIPoint16 pt2 = SkIPoint16::Make(45, 66); |
| 53 | SkDebugf("pt1.fX %c= pt2.fX\n", pt1.fX == pt2.fX ? '=' : '!'); |
| 54 | SkDebugf("pt1.fY %c= pt2.fY\n", pt1.fY == pt2.fY ? '=' : '!'); |
| 55 | #StdOut |
| 56 | pt1.fX == pt2.fX |
| 57 | pt1.fY == pt2.fY |
| 58 | ## |
| 59 | ## |
| 60 | |
| 61 | #SeeAlso set() SkPoint::iset() SkIPoint::Make |
| 62 | |
| 63 | #Method ## |
| 64 | |
| 65 | # ------------------------------------------------------------------------------ |
| 66 | |
| 67 | #Method int16_t x() const |
| 68 | |
Cary Clark | ab2621d | 2018-01-30 10:08:57 -0500 | [diff] [blame] | 69 | #Line # returns fX ## |
Cary Clark | a560c47 | 2017-11-27 10:44:06 -0500 | [diff] [blame] | 70 | Returns x-axis value of IPoint16. |
| 71 | |
| 72 | #Return fX ## |
| 73 | |
| 74 | #Example |
| 75 | SkIPoint16 pt1 = {45, 66}; |
| 76 | SkDebugf("pt1.fX %c= pt1.x()\n", pt1.fX == pt1.x() ? '=' : '!'); |
| 77 | #StdOut |
| 78 | pt1.fX == pt1.x() |
| 79 | ## |
| 80 | ## |
| 81 | |
| 82 | #SeeAlso y() SkIPoint::x() |
| 83 | |
| 84 | #Method ## |
| 85 | |
| 86 | # ------------------------------------------------------------------------------ |
| 87 | |
| 88 | #Method int16_t y() const |
| 89 | |
Cary Clark | ab2621d | 2018-01-30 10:08:57 -0500 | [diff] [blame] | 90 | #Line # returns fY ## |
Cary Clark | a560c47 | 2017-11-27 10:44:06 -0500 | [diff] [blame] | 91 | Returns y-axis value of IPoint. |
| 92 | |
| 93 | #Return fY ## |
| 94 | |
| 95 | #Example |
| 96 | SkIPoint16 pt1 = {45, 66}; |
| 97 | SkDebugf("pt1.fY %c= pt1.y()\n", pt1.fY == pt1.y() ? '=' : '!'); |
| 98 | #StdOut |
| 99 | pt1.fY == pt1.y() |
| 100 | ## |
| 101 | ## |
| 102 | |
| 103 | #SeeAlso x() SkPoint::y() SkIPoint::y() |
| 104 | |
| 105 | #Method ## |
| 106 | |
| 107 | # ------------------------------------------------------------------------------ |
| 108 | |
| 109 | #Method void set(int x, int y) |
| 110 | |
Cary Clark | ab2621d | 2018-01-30 10:08:57 -0500 | [diff] [blame] | 111 | #Line # sets to integer input ## |
Cary Clark | a560c47 | 2017-11-27 10:44:06 -0500 | [diff] [blame] | 112 | Sets fX to x and fY to y. |
| 113 | |
| 114 | #Param x new value for fX ## |
| 115 | #Param y new value for fY ## |
| 116 | |
| 117 | #Example |
| 118 | SkIPoint16 pt1, pt2 = { SK_MinS16, SK_MaxS16 }; |
| 119 | pt1.set(SK_MinS16, SK_MaxS16); |
| 120 | SkDebugf("pt1.fX %c= pt2.fX\n", pt1.fX == pt2.fX ? '=' : '!'); |
| 121 | SkDebugf("pt1.fY %c= pt2.fY\n", pt1.fY == pt2.fY ? '=' : '!'); |
| 122 | #StdOut |
| 123 | pt1.fX == pt2.fX |
| 124 | pt1.fY == pt2.fY |
| 125 | ## |
| 126 | ## |
| 127 | |
| 128 | #SeeAlso Make SkPoint::set |
| 129 | |
| 130 | #Method ## |
| 131 | |
| 132 | #Struct SkIPoint16 ## |
| 133 | |
| 134 | #Topic IPoint16 ## |