Skip to content

Commit

Permalink
more docs and ToARGB function rename
Browse files Browse the repository at this point in the history
  • Loading branch information
oktonion committed Jul 20, 2019
1 parent 24ce923 commit 45542b4
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/Color.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ namespace PhWidgets
ColorBase(MakeColorBase(argb))
{ }

PgColor_t Color::ToArgb () const
PgColor_t Color::ToARGB () const
{
return PgARGB(A, R, G, B);
}
Expand Down
26 changes: 25 additions & 1 deletion src/Color.h
Original file line number Diff line number Diff line change
Expand Up @@ -350,6 +350,10 @@ namespace PhWidgets
@remark
To create an opaque color, set alpha to 255. To create a semitransparent color, set alpha to any value from 1 through 254.
@see
- Color::FromCMY
- Color::FromHSV
*/
static Color FromARGB(unsigned char alpha, unsigned char red, unsigned char green, unsigned char blue);

Expand All @@ -359,6 +363,10 @@ namespace PhWidgets
@param[in] green The green component. Valid values are 0 through 255.
@param[in] blue The blue component. Valid values are 0 through 255.
@return The Color that this method creates.
@see
- Color::FromCMY
- Color::FromHSV
*/
static Color FromARGB(unsigned char red, unsigned char green, unsigned char blue);

Expand All @@ -370,6 +378,10 @@ namespace PhWidgets
@remark
To create an opaque color, set alpha to 255. To create a semitransparent color, set alpha to any value from 1 through 254.
@see
- Color::FromCMY
- Color::FromHSV
*/
static Color FromARGB(unsigned char alpha, Color color);

Expand All @@ -383,6 +395,10 @@ namespace PhWidgets
The most significant byte (MSB), represented by AA, is the alpha component value.
The second, third, and fourth bytes, represented by RR, GG, and BB, respectively,
are the color components red, green, and blue, respectively.
@see
- Color::FromCMY
- Color::FromHSV
*/
static Color FromARGB(PgColor_t argb);
//@}
Expand All @@ -393,6 +409,10 @@ namespace PhWidgets
@param[in] magenta The magenta component. Valid values are 0 through 255.
@param[in] yellow The yellow component. Valid values are 0 through 255.
@return The Color that this method creates.
@see
- Color::FromARGB
- Color::FromHSV
*/
static Color FromCMY(unsigned char cyan, unsigned char magenta, unsigned char yellow);

Expand All @@ -403,14 +423,18 @@ namespace PhWidgets
@param[in] saturation The saturation. Valid values are 0 through 255.
@param[in] value The value. Valid values are 0 through 255.
@return The Color that this method creates.
@see
- Color::FromCMY
- Color::FromARGB
*/
static Color FromHSV(unsigned short hue, unsigned char saturation, unsigned char value);

//! Gets the 32-bit ARGB value of this Color class.
/*!
@return The 32-bit ARGB value `PgColor_t` of this Color.
*/
PgColor_t ToArgb () const;
PgColor_t ToARGB () const;

//! Converts to the 32-bit ARGB value of this Color class.
/*!
Expand Down

0 comments on commit 45542b4

Please sign in to comment.