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