Cary Clark | 2d4bf5f | 2018-04-16 08:37:38 -0400 | [diff] [blame] | 1 | #Topic Color4f |
Cary Clark | 137b874 | 2018-05-30 09:21:49 -0400 | [diff] [blame] | 2 | #Alias Color4f_Reference ## |
Cary Clark | 2d4bf5f | 2018-04-16 08:37:38 -0400 | [diff] [blame] | 3 | |
Cary Clark | 61313f3 | 2018-10-08 14:57:48 -0400 | [diff] [blame] | 4 | #Struct SkPM4f |
| 5 | ## |
| 6 | |
| 7 | #Struct SkRGBA4f |
| 8 | |
| 9 | #Code |
| 10 | #Populate |
| 11 | ## |
Cary Clark | 2d4bf5f | 2018-04-16 08:37:38 -0400 | [diff] [blame] | 12 | |
Cary Clark | ffb3d68 | 2018-05-17 12:17:28 -0400 | [diff] [blame] | 13 | Each component is stored as a 32-bit single precision floating point float value. |
| 14 | All values are allowed, but only the range from zero to one is meaningful. |
| 15 | |
Cary Clark | 61313f3 | 2018-10-08 14:57:48 -0400 | [diff] [blame] | 16 | Components are independent of the others if defined with kUnpremul_SkAlphaType; |
| 17 | fA Alpha is may be greater or smaller than fG green, fB blue, or fR red. |
| 18 | SkColor4f is shorthand for Unpremultiplied SkRGBA4f. |
| 19 | |
Cary Clark | 77b3f3a | 2018-11-07 14:59:03 -0500 | [diff] [blame] | 20 | Components are connected if defined with kPremul_SkAlphaType; |
Cary Clark | 61313f3 | 2018-10-08 14:57:48 -0400 | [diff] [blame] | 21 | fA Alpha is equal to or larger than fG green, fB blue, and fR red. The values |
| 22 | stored in fG, fB, and fR combine the color component with the Alpha component. |
Cary Clark | ffb3d68 | 2018-05-17 12:17:28 -0400 | [diff] [blame] | 23 | |
| 24 | Values smaller than zero or larger than one are allowed. Values out of range |
| 25 | may be used with Blend_Mode so that the final component is in range. |
Cary Clark | 2d4bf5f | 2018-04-16 08:37:38 -0400 | [diff] [blame] | 26 | |
Cary Clark | 2d4bf5f | 2018-04-16 08:37:38 -0400 | [diff] [blame] | 27 | #Member float fR |
Cary Clark | ffb3d68 | 2018-05-17 12:17:28 -0400 | [diff] [blame] | 28 | #Line # red component ## |
| 29 | Single precision float for red ranges from no red (0.0) to full red (1.0). |
Cary Clark | 2d4bf5f | 2018-04-16 08:37:38 -0400 | [diff] [blame] | 30 | ## |
| 31 | |
| 32 | #Member float fG |
Cary Clark | ffb3d68 | 2018-05-17 12:17:28 -0400 | [diff] [blame] | 33 | #Line # green component ## |
| 34 | Single precision float for green ranges from no green (0.0) to full green (1.0). |
Cary Clark | 2d4bf5f | 2018-04-16 08:37:38 -0400 | [diff] [blame] | 35 | ## |
| 36 | |
| 37 | #Member float fB |
Cary Clark | ffb3d68 | 2018-05-17 12:17:28 -0400 | [diff] [blame] | 38 | #Line # blue component ## |
| 39 | Single precision float for blue ranges from no blue (0.0) to full blue (1.0). |
Cary Clark | 2d4bf5f | 2018-04-16 08:37:38 -0400 | [diff] [blame] | 40 | ## |
| 41 | |
| 42 | #Member float fA |
Cary Clark | ffb3d68 | 2018-05-17 12:17:28 -0400 | [diff] [blame] | 43 | #Line # alpha component ## |
| 44 | Single precision float for Alpha ranges from no Alpha (0.0) to full Alpha (1.0). |
Cary Clark | 2d4bf5f | 2018-04-16 08:37:38 -0400 | [diff] [blame] | 45 | ## |
| 46 | |
Cary Clark | 61313f3 | 2018-10-08 14:57:48 -0400 | [diff] [blame] | 47 | |
Cary Clark | 2d4bf5f | 2018-04-16 08:37:38 -0400 | [diff] [blame] | 48 | # ------------------------------------------------------------------------------ |
| 49 | |
Cary Clark | cb6bef0 | 2018-11-29 12:05:25 -0500 | [diff] [blame] | 50 | #Method bool operator==(const SkRGBA4f& other) const |
Cary Clark | 61313f3 | 2018-10-08 14:57:48 -0400 | [diff] [blame] | 51 | #Line # compares SkRGBA4f for equality ## |
Cary Clark | 2d4bf5f | 2018-04-16 08:37:38 -0400 | [diff] [blame] | 52 | |
Cary Clark | 61313f3 | 2018-10-08 14:57:48 -0400 | [diff] [blame] | 53 | Compares SkRGBA4f with other, and returns true if all components are equivalent. |
Cary Clark | 2d4bf5f | 2018-04-16 08:37:38 -0400 | [diff] [blame] | 54 | |
Cary Clark | 61313f3 | 2018-10-08 14:57:48 -0400 | [diff] [blame] | 55 | #Param other SkRGBA4f to compare ## |
Cary Clark | ffb3d68 | 2018-05-17 12:17:28 -0400 | [diff] [blame] | 56 | |
Cary Clark | 61313f3 | 2018-10-08 14:57:48 -0400 | [diff] [blame] | 57 | #Return true if SkRGBA4f equals other ## |
Cary Clark | 2d4bf5f | 2018-04-16 08:37:38 -0400 | [diff] [blame] | 58 | |
| 59 | #Example |
Cary Clark | ffb3d68 | 2018-05-17 12:17:28 -0400 | [diff] [blame] | 60 | SkColor4f colorRed = { 1, 0, 0, 1 };
|
| 61 | SkColor4f colorNamedRed = SkColor4f::FromColor(SK_ColorRED);
|
| 62 | SkDebugf("colorRed %c= colorNamedRed", colorRed == colorNamedRed ? '=' : '!');
|
| 63 | #StdOut |
| 64 | colorRed == colorNamedRed |
| 65 | ## |
Cary Clark | 2d4bf5f | 2018-04-16 08:37:38 -0400 | [diff] [blame] | 66 | ## |
| 67 | |
Cary Clark | cb6bef0 | 2018-11-29 12:05:25 -0500 | [diff] [blame] | 68 | #SeeAlso operator!=(const SkRGBA4f& other) const |
Cary Clark | 2d4bf5f | 2018-04-16 08:37:38 -0400 | [diff] [blame] | 69 | |
| 70 | #Method ## |
| 71 | |
| 72 | # ------------------------------------------------------------------------------ |
| 73 | |
Cary Clark | cb6bef0 | 2018-11-29 12:05:25 -0500 | [diff] [blame] | 74 | #Method bool operator!=(const SkRGBA4f& other) const |
Cary Clark | 61313f3 | 2018-10-08 14:57:48 -0400 | [diff] [blame] | 75 | #Line # compares SkRGBA4f for inequality ## |
Cary Clark | 2d4bf5f | 2018-04-16 08:37:38 -0400 | [diff] [blame] | 76 | |
Cary Clark | 61313f3 | 2018-10-08 14:57:48 -0400 | [diff] [blame] | 77 | Compares SkRGBA4f with other, and returns true if all components are not |
Cary Clark | ffb3d68 | 2018-05-17 12:17:28 -0400 | [diff] [blame] | 78 | equivalent. |
Cary Clark | 2d4bf5f | 2018-04-16 08:37:38 -0400 | [diff] [blame] | 79 | |
Cary Clark | 61313f3 | 2018-10-08 14:57:48 -0400 | [diff] [blame] | 80 | #Param other SkRGBA4f to compare ## |
Cary Clark | ffb3d68 | 2018-05-17 12:17:28 -0400 | [diff] [blame] | 81 | |
Cary Clark | 61313f3 | 2018-10-08 14:57:48 -0400 | [diff] [blame] | 82 | #Return true if SkRGBA4f is not equal to other ## |
Cary Clark | 2d4bf5f | 2018-04-16 08:37:38 -0400 | [diff] [blame] | 83 | |
| 84 | #Example |
Cary Clark | ffb3d68 | 2018-05-17 12:17:28 -0400 | [diff] [blame] | 85 | SkColor4f colorGray = { .5, .5, .5, 1 };
|
| 86 | SkColor4f colorNamedGray = SkColor4f::FromColor(SK_ColorGRAY);
|
| 87 | SkDebugf("colorGray %c= colorNamedGray ", colorGray != colorNamedGray ? '!' : '=');
|
| 88 | #StdOut |
| 89 | colorGray != colorNamedGray |
| 90 | ## |
Cary Clark | 2d4bf5f | 2018-04-16 08:37:38 -0400 | [diff] [blame] | 91 | ## |
| 92 | |
Cary Clark | cb6bef0 | 2018-11-29 12:05:25 -0500 | [diff] [blame] | 93 | #SeeAlso operator==(const SkRGBA4f& other) const |
Cary Clark | 61313f3 | 2018-10-08 14:57:48 -0400 | [diff] [blame] | 94 | |
| 95 | #Method ## |
| 96 | |
Cary Clark | cb6bef0 | 2018-11-29 12:05:25 -0500 | [diff] [blame] | 97 | #Method SkRGBA4f operator*(float scale) const |
Cary Clark | 61313f3 | 2018-10-08 14:57:48 -0400 | [diff] [blame] | 98 | #Line # multiplies components by scale ## |
| 99 | |
| 100 | Multiplies each component by scale. Does not pin the result. |
| 101 | |
| 102 | #Param scale component multiplier ## |
| 103 | |
| 104 | #Return scaled color ## |
| 105 | |
| 106 | #NoExample |
| 107 | ## |
| 108 | |
| 109 | #SeeAlso SkBlendMode::kMultiply |
| 110 | |
| 111 | #Method ## |
| 112 | |
Cary Clark | cb6bef0 | 2018-11-29 12:05:25 -0500 | [diff] [blame] | 113 | #Method SkRGBA4f operator*(const SkRGBA4f& scale) const |
Cary Clark | 61313f3 | 2018-10-08 14:57:48 -0400 | [diff] [blame] | 114 | |
| 115 | Multiplies each component by scale component. Does not pin the result. |
| 116 | |
| 117 | #Param scale SkRGBA4f component multipliers ## |
| 118 | |
| 119 | #Return scaled color ## |
| 120 | |
| 121 | #NoExample |
| 122 | ## |
| 123 | |
| 124 | #SeeAlso SkBlendMode::kMultiply |
Cary Clark | 2d4bf5f | 2018-04-16 08:37:38 -0400 | [diff] [blame] | 125 | |
| 126 | #Method ## |
| 127 | |
| 128 | # ------------------------------------------------------------------------------ |
| 129 | |
Cary Clark | 61313f3 | 2018-10-08 14:57:48 -0400 | [diff] [blame] | 130 | #Subtopic Property_Functions |
| 131 | #Line # member values ## |
| 132 | #Subtopic Property_Functions ## |
| 133 | |
Cary Clark | 2d4bf5f | 2018-04-16 08:37:38 -0400 | [diff] [blame] | 134 | #Method const float* vec() const |
Cary Clark | 61313f3 | 2018-10-08 14:57:48 -0400 | [diff] [blame] | 135 | #In Property_Functions |
Cary Clark | ffb3d68 | 2018-05-17 12:17:28 -0400 | [diff] [blame] | 136 | #Line # returns array of components ## |
Cary Clark | 2d4bf5f | 2018-04-16 08:37:38 -0400 | [diff] [blame] | 137 | |
Cary Clark | 61313f3 | 2018-10-08 14:57:48 -0400 | [diff] [blame] | 138 | Returns SkRGBA4f components as a read-only array. |
Cary Clark | ffb3d68 | 2018-05-17 12:17:28 -0400 | [diff] [blame] | 139 | |
| 140 | #Return components as read-only array ## |
Cary Clark | 2d4bf5f | 2018-04-16 08:37:38 -0400 | [diff] [blame] | 141 | |
| 142 | #Example |
Cary Clark | ffb3d68 | 2018-05-17 12:17:28 -0400 | [diff] [blame] | 143 | SkColor4f color = SkColor4f::FromColor(0x884488CC);
|
| 144 | SkDebugf("red=%g green=%g blue=%g alpha=%g\n", color.fR, color.fG, color.fB, color.fA);
|
| 145 | const float* array = color.vec();
|
| 146 | SkDebugf("[0]=%g [1]=%g [2]=%g [3]=%g\n", array[0], array[1], array[2], array[3]);
|
| 147 | #StdOut |
Cary Clark | 5b1f953 | 2018-08-28 14:53:37 -0400 | [diff] [blame] | 148 | red=0.266667 green=0.533333 blue=0.8 alpha=0.533333
|
| 149 | [0]=0.266667 [1]=0.533333 [2]=0.8 [3]=0.533333 |
Cary Clark | ffb3d68 | 2018-05-17 12:17:28 -0400 | [diff] [blame] | 150 | ## |
Cary Clark | 2d4bf5f | 2018-04-16 08:37:38 -0400 | [diff] [blame] | 151 | ## |
| 152 | |
Cary Clark | ffb3d68 | 2018-05-17 12:17:28 -0400 | [diff] [blame] | 153 | #SeeAlso SkColor4f |
Cary Clark | 2d4bf5f | 2018-04-16 08:37:38 -0400 | [diff] [blame] | 154 | |
| 155 | #Method ## |
| 156 | |
| 157 | # ------------------------------------------------------------------------------ |
| 158 | |
| 159 | #Method float* vec() |
Cary Clark | 61313f3 | 2018-10-08 14:57:48 -0400 | [diff] [blame] | 160 | #In Property_Functions |
Cary Clark | ffb3d68 | 2018-05-17 12:17:28 -0400 | [diff] [blame] | 161 | #Line # returns array of components ## |
Cary Clark | 2d4bf5f | 2018-04-16 08:37:38 -0400 | [diff] [blame] | 162 | |
Cary Clark | 61313f3 | 2018-10-08 14:57:48 -0400 | [diff] [blame] | 163 | Returns SkRGBA4f components as a writable array. |
Cary Clark | ffb3d68 | 2018-05-17 12:17:28 -0400 | [diff] [blame] | 164 | |
| 165 | #Return components as writable array ## |
Cary Clark | 2d4bf5f | 2018-04-16 08:37:38 -0400 | [diff] [blame] | 166 | |
| 167 | #Example |
Cary Clark | ffb3d68 | 2018-05-17 12:17:28 -0400 | [diff] [blame] | 168 | SkColor4f color = SkColor4f::FromColor(0x884488CC);
|
| 169 | SkDebugf("red=%g green=%g blue=%g alpha=%g\n", color.fR, color.fG, color.fB, color.fA);
|
| 170 | float* array = color.vec();
|
| 171 | array[3] = 1;
|
| 172 | SkDebugf("[0]=%g [1]=%g [2]=%g [3]=%g\n", array[0], array[1], array[2], array[3]); |
| 173 | #StdOut |
Cary Clark | 5b1f953 | 2018-08-28 14:53:37 -0400 | [diff] [blame] | 174 | red=0.266667 green=0.533333 blue=0.8 alpha=0.533333
|
| 175 | [0]=0.266667 [1]=0.533333 [2]=0.8 [3]=1 |
Cary Clark | ffb3d68 | 2018-05-17 12:17:28 -0400 | [diff] [blame] | 176 | ## |
Cary Clark | 2d4bf5f | 2018-04-16 08:37:38 -0400 | [diff] [blame] | 177 | ## |
| 178 | |
Cary Clark | ffb3d68 | 2018-05-17 12:17:28 -0400 | [diff] [blame] | 179 | #SeeAlso SkColor4f |
Cary Clark | 2d4bf5f | 2018-04-16 08:37:38 -0400 | [diff] [blame] | 180 | |
| 181 | #Method ## |
| 182 | |
Cary Clark | cb6bef0 | 2018-11-29 12:05:25 -0500 | [diff] [blame] | 183 | #Method float operator[](int index) const |
Cary Clark | 61313f3 | 2018-10-08 14:57:48 -0400 | [diff] [blame] | 184 | #Line # returns component by index ## |
| 185 | |
| 186 | Returns SkRGBA4f component by index, zero through three. index out of range |
| 187 | triggers an assert in debug builds. |
| 188 | |
| 189 | #Param index component, zero through three ## |
| 190 | #Return component by index ## |
| 191 | |
| 192 | #NoExample |
| 193 | ## |
| 194 | |
| 195 | #SeeAlso vec |
| 196 | |
| 197 | #Method ## |
| 198 | |
| 199 | #Method float& operator[](int index) |
| 200 | #Line # returns writable component reference ## |
| 201 | |
| 202 | Returns writable component reference by index, zero through three. index out of range |
| 203 | triggers an assert in debug builds. |
| 204 | |
| 205 | #Param index component, zero through three ## |
| 206 | #Return writable component reference by index ## |
| 207 | |
| 208 | #NoExample |
| 209 | ## |
| 210 | |
| 211 | #SeeAlso vec |
| 212 | |
| 213 | #Method ## |
| 214 | |
Cary Clark | 2d4bf5f | 2018-04-16 08:37:38 -0400 | [diff] [blame] | 215 | # ------------------------------------------------------------------------------ |
| 216 | |
Cary Clark | 61313f3 | 2018-10-08 14:57:48 -0400 | [diff] [blame] | 217 | #Subtopic Utility_Functions |
| 218 | #Line # less common functions ## |
| 219 | #Subtopic Utility_Functions ## |
| 220 | |
| 221 | #Method bool isOpaque() const |
| 222 | #In Utility_Functions |
| 223 | #Line # returns if Alpha component is at maximum ## |
| 224 | |
| 225 | Returns true if Alpha component is one. Color has no transparency regardless of |
| 226 | whether color is Premultiplied or Unpremultiplied. Triggers a debugging assert |
| 227 | if Alpha not valid. |
| 228 | |
| 229 | #Return true if Alpha is one ## |
| 230 | |
| 231 | #NoExample |
| 232 | ## |
| 233 | |
| 234 | #SeeAlso vec SkColorGetA |
| 235 | |
| 236 | ## |
| 237 | |
| 238 | # ------------------------------------------------------------------------------ |
| 239 | |
Cary Clark | cb6bef0 | 2018-11-29 12:05:25 -0500 | [diff] [blame] | 240 | #Method static SkRGBA4f FromColor(SkColor color) |
Cary Clark | 61313f3 | 2018-10-08 14:57:48 -0400 | [diff] [blame] | 241 | #In Utility_Functions |
| 242 | #Line # sets components from Color ## |
Cary Clark | cb6bef0 | 2018-11-29 12:05:25 -0500 | [diff] [blame] | 243 | #Populate |
Cary Clark | 61313f3 | 2018-10-08 14:57:48 -0400 | [diff] [blame] | 244 | |
| 245 | #Example |
| 246 | uint8_t red = 77, green = 101, blue = 153, alpha = 43;
|
| 247 | SkColor argb = SkColorSetARGB(alpha, red, green, blue);
|
| 248 | SkColor4f color4f = SkColor4f::FromColor(argb);
|
| 249 | SkDebugf("red=%g green=%g blue=%g alpha=%g\n", color4f.fR, color4f.fG, color4f.fB, color4f.fA);
|
| 250 | SkColor fromColor4f = color4f.toSkColor();
|
| 251 | SkDebugf("red=%d green=%d blue=%d alpha=%d\n", SkColorGetR(fromColor4f),
|
| 252 | SkColorGetG(fromColor4f), SkColorGetB(fromColor4f), SkColorGetA(fromColor4f)); |
| 253 | #StdOut |
| 254 | red=0.301961 green=0.396078 blue=0.6 alpha=0.168627
|
| 255 | red=77 green=101 blue=153 alpha=43 |
| 256 | ## |
| 257 | ## |
| 258 | |
| 259 | #SeeAlso toSkColor |
| 260 | |
| 261 | #Method ## |
| 262 | |
| 263 | # ------------------------------------------------------------------------------ |
| 264 | |
| 265 | #Method SkColor toSkColor() const |
| 266 | #In Utility_Functions |
| 267 | #Line # returns closest Color ## |
| 268 | |
| 269 | Converts to closest SkColor. |
| 270 | |
| 271 | #Return closest Color ## |
| 272 | |
| 273 | #Example |
| 274 | float red = 0.07, green = 0.13, blue = 0.32, alpha = 0.17;
|
| 275 | SkColor4f color4f = { red, green, blue, alpha };
|
| 276 | SkColor argb = color4f.toSkColor();
|
| 277 | SkDebugf("red=%d green=%d blue=%d alpha=%d\n", SkColorGetR(argb),
|
| 278 | SkColorGetG(argb), SkColorGetB(argb), SkColorGetA(argb)); |
| 279 | SkColor4f fromSkColor = SkColor4f::FromColor(argb);
|
| 280 | SkDebugf("red=%g green=%g blue=%g alpha=%g\n", fromSkColor.fR, fromSkColor.fG,
|
| 281 | fromSkColor.fB, fromSkColor.fA);
|
| 282 | #StdOut
|
| 283 | red=18 green=33 blue=82 alpha=43
|
| 284 | red=0.0705882 green=0.129412 blue=0.321569 alpha=0.168627
|
| 285 | ##
|
| 286 | ## |
| 287 | |
| 288 | #SeeAlso FromColor |
| 289 | |
| 290 | #Method ## |
| 291 | |
| 292 | # ------------------------------------------------------------------------------ |
| 293 | |
| 294 | #Method static SkRGBA4f FromPMColor(SkPMColor) |
| 295 | #In Utility_Functions |
| 296 | #Line # converts from Premultiplied Color ## |
| 297 | |
| 298 | Converts from Premultiplied integer components to Unpremultiplied float |
| 299 | components. |
| 300 | |
| 301 | #Param SkPMColor Premultiplied color ## |
| 302 | |
| 303 | #Return Unpremultiplied color ## |
| 304 | |
| 305 | #NoExample |
| 306 | ## |
| 307 | |
| 308 | #SeeAlso FromColor |
| 309 | |
| 310 | #Method ## |
| 311 | |
| 312 | # ------------------------------------------------------------------------------ |
| 313 | |
| 314 | #Method SkRGBA4f<kPremul_SkAlphaType> premul() const |
Cary Clark | b94f6da | 2018-06-08 11:54:32 -0400 | [diff] [blame] | 315 | #In Utility |
Cary Clark | c9b49fe | 2018-09-21 14:26:30 -0400 | [diff] [blame] | 316 | #Line # returns Premultiplied color ## |
| 317 | |
| 318 | Returns SkColor4f with all components premultiplied by Alpha. |
| 319 | |
| 320 | #Return Premultiplied color ## |
| 321 | |
| 322 | #NoExample |
| 323 | ## |
| 324 | |
| 325 | #SeeAlso unpremul |
| 326 | |
| 327 | #Method ## |
| 328 | |
Cary Clark | 61313f3 | 2018-10-08 14:57:48 -0400 | [diff] [blame] | 329 | #Method SkRGBA4f<kUnpremul_SkAlphaType> unpremul() const |
Cary Clark | c9b49fe | 2018-09-21 14:26:30 -0400 | [diff] [blame] | 330 | #In Utility |
| 331 | #Line # returns Unpremultiplied color ## |
| 332 | |
Cary Clark | 61313f3 | 2018-10-08 14:57:48 -0400 | [diff] [blame] | 333 | Returns SkRGBA4f with all components independent of Alpha. |
Cary Clark | c9b49fe | 2018-09-21 14:26:30 -0400 | [diff] [blame] | 334 | |
| 335 | #Return Unpremultiplied color ## |
| 336 | |
| 337 | #NoExample |
| 338 | ## |
| 339 | |
| 340 | #SeeAlso premul |
| 341 | |
| 342 | #Method ## |
| 343 | |
Cary Clark | 7bae65d | 2018-10-17 09:39:54 -0400 | [diff] [blame] | 344 | #Method uint32_t toBytes_RGBA() const |
| 345 | #In Utility |
| 346 | #Line # returns kRGBA_8888_SkColorType color ## |
| 347 | |
| 348 | Produces bytes in RGBA order. Component values are not affected by color Alpha. |
| 349 | |
| 350 | #Return color ## |
| 351 | |
| 352 | #NoExample |
| 353 | ## |
| 354 | |
| 355 | #Method ## |
| 356 | |
| 357 | #Method static SkRGBA4f FromBytes_RGBA(uint32_t color) |
| 358 | #In Utility |
| 359 | #Line # sets kRGBA_8888_SkColorType color ## |
| 360 | |
| 361 | Returns from color kRGBA_8888_SkColorType order. Component values are |
| 362 | not affected by color Alpha. |
| 363 | |
| 364 | #Param color Premultiplied or Unpremultiplied ## |
| 365 | #Return color ## |
| 366 | |
| 367 | #NoExample |
| 368 | ## |
| 369 | |
| 370 | #Method ## |
| 371 | |
| 372 | #Method SkRGBA4f makeOpaque() const |
| 373 | #In Utility |
| 374 | #Line # returns color without transparency ## |
| 375 | |
| 376 | Returns color with Alpha set to one. |
| 377 | |
| 378 | #Return color ## |
| 379 | |
| 380 | #NoExample |
| 381 | ## |
| 382 | |
| 383 | #Method ## |
| 384 | |
Cary Clark | 61313f3 | 2018-10-08 14:57:48 -0400 | [diff] [blame] | 385 | #Struct ## |
Cary Clark | c9b49fe | 2018-09-21 14:26:30 -0400 | [diff] [blame] | 386 | |
Cary Clark | 61313f3 | 2018-10-08 14:57:48 -0400 | [diff] [blame] | 387 | #Typedef SkRGBA4f SkColor4f |
| 388 | #Line # defines Unpremultiplied Color using floats ## |
| 389 | |
| 390 | #Code |
| 391 | using SkColor4f = SkRGBA4f<kUnpremul_SkAlphaType>; |
Cary Clark | b94f6da | 2018-06-08 11:54:32 -0400 | [diff] [blame] | 392 | ## |
Cary Clark | 2d4bf5f | 2018-04-16 08:37:38 -0400 | [diff] [blame] | 393 | |
Cary Clark | 682c58d | 2018-05-16 07:07:07 -0400 | [diff] [blame] | 394 | ## |
| 395 | |
Cary Clark | 2d4bf5f | 2018-04-16 08:37:38 -0400 | [diff] [blame] | 396 | #Topic Color4f ## |