Lines Matching refs:color

45 	\param color RGB16 color
47 This function will do nothing if passed a NULL 32-bit color.
50 SetRGBColor16(rgb_color *col,uint16 color)
60 r16= (color >> 11) & 31;
61 g16= (color >> 5) & 63;
62 b16= color & 31;
71 \brief Finds the index of the closest matching color in a rgb_color palette array
73 \param color Color to match
74 \return Index of the closest matching color
80 FindClosestColor(const rgb_color *palette, rgb_color color)
89 delta = abs(c->red-color.red) + abs(c->green-color.green)
90 + abs(c->blue-color.blue);
108 \brief Constructs a RGBA15 color which best matches a given 32-bit color
109 \param color Color to match
110 \return The closest matching color's value
115 FindClosestColor15(rgb_color color)
117 uint16 r16 = uint16(color.red * RATIO_8_TO_5_BIT);
118 uint16 g16 = uint16(color.green * RATIO_8_TO_5_BIT);
119 uint16 b16 = uint16(color.blue * RATIO_8_TO_5_BIT);
122 uint16 color16 = color.alpha > 127 ? 0x8000 : 0;
133 \brief Constructs a RGB16 color which best matches a given 32-bit color
134 \param color Color to match
135 \return The closest matching color's value
140 FindClosestColor16(rgb_color color)
142 uint16 r16 = uint16(color.red * RATIO_8_TO_5_BIT);
143 uint16 g16 = uint16(color.green * RATIO_8_TO_6_BIT);
144 uint16 b16 = uint16(color.blue * RATIO_8_TO_5_BIT);
185 \param color color to initialize from
187 RGBColor::RGBColor(const rgb_color &color)
189 SetColor(color);
194 \brief Create an RGBColor from a 16-bit RGBA color
195 \param color color to initialize from
197 RGBColor::RGBColor(uint16 color)
199 SetColor(color);
204 \brief Create an RGBColor from an index color
205 \param color color to initialize from
207 RGBColor::RGBColor(uint8 color)
209 SetColor(color);
215 \param color color to initialize from
217 RGBColor::RGBColor(const RGBColor &color)
219 fColor32 = color.fColor32;
220 fColor16 = color.fColor16;
221 fColor15 = color.fColor15;
222 fColor8 = color.fColor8;
223 fUpdate8 = color.fUpdate8;
224 fUpdate15 = color.fUpdate15;
225 fUpdate16 = color.fUpdate16;
239 \brief Returns the color as the closest 8-bit color in the palette
240 \return The palette index for the current color
255 \brief Returns the color as the closest 15-bit color
256 \return 15-bit value of the current color plus 1-bit alpha
271 \brief Returns the color as the closest 16-bit color
272 \return 16-bit value of the current color
287 \brief Returns the color as a 32-bit color
288 \return current color, including alpha
337 \param col16 color to copy
354 \param col8 color to copy
369 \brief Set the object to specified color
370 \param color color to copy
373 RGBColor::SetColor(const rgb_color &color)
375 fColor32 = color;
381 \brief Set the object to specified color
382 \param color color to copy
385 RGBColor::SetColor(const RGBColor &color)
387 fColor32 = color.fColor32;
388 fColor16 = color.fColor16;
389 fColor15 = color.fColor15;
390 fColor8 = color.fColor8;
391 fUpdate8 = color.fUpdate8;
392 fUpdate15 = color.fUpdate15;
393 fUpdate16 = color.fUpdate16;
398 \brief Set the object to specified color
399 \param color color to copy
402 RGBColor::operator=(const RGBColor &color)
404 fColor32 = color.fColor32;
405 fColor16 = color.fColor16;
406 fColor15 = color.fColor15;
407 fColor8 = color.fColor8;
408 fUpdate8 = color.fUpdate8;
409 fUpdate15 = color.fUpdate15;
410 fUpdate16 = color.fUpdate16;
417 \brief Set the object to specified color
418 \param color color to copy
421 RGBColor::operator=(const rgb_color &color)
423 fColor32 = color;
431 \brief Prints the 32-bit values of the color to standard out
443 \return true if all color elements are exactly equal
446 RGBColor::operator==(const rgb_color &color) const
448 return fColor32.red == color.red
449 && fColor32.green == color.green
450 && fColor32.blue == color.blue
451 && fColor32.alpha == color.alpha;
457 \return true if all color elements are exactly equal
460 RGBColor::operator==(const RGBColor &color) const
462 return fColor32.red == color.fColor32.red
463 && fColor32.green == color.fColor32.green
464 && fColor32.blue == color.fColor32.blue
465 && fColor32.alpha == color.fColor32.alpha;
470 RGBColor::operator!=(const rgb_color &color) const
472 return fColor32.red != color.red
473 || fColor32.green != color.green
474 || fColor32.blue != color.blue
475 || fColor32.alpha != color.alpha;
480 RGBColor::operator!=(const RGBColor &color) const
482 return fColor32.red != color.fColor32.red
483 || fColor32.green != color.fColor32.green
484 || fColor32.blue != color.fColor32.blue
485 || fColor32.alpha != color.fColor32.alpha;