Added convertsion from wxColour to COLOR4D.

This commit is contained in:
Maciej Suminski 2013-06-24 10:32:08 +02:00
parent 08c54e8acf
commit 81c674387e
2 changed files with 20 additions and 0 deletions

View File

@ -37,6 +37,17 @@ COLOR4D::COLOR4D( EDA_COLOR_T aColor )
}
#ifdef WX_COMPATIBILITY
COLOR4D::COLOR4D( const wxColour& aColor )
{
r = aColor.Red();
g = aColor.Green();
b = aColor.Blue();
a = aColor.Alpha();
}
#endif
const bool COLOR4D::operator==( const COLOR4D& aColor )
{
return a == aColor.a && r == aColor.r && g == aColor.g && b == aColor.b;

View File

@ -65,6 +65,15 @@ public:
*/
COLOR4D( EDA_COLOR_T aColor );
#ifdef WX_COMPATIBILITY
/**
* @brief Constructor
*
* @param aColor is the color type used by wxWidgets.
*/
COLOR4D( const wxColour& aColor );
#endif /* WX_COMPATIBLITY */
/**
* Function Highlight
* Makes the color brighter by a given factor.