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