GdkColor<->wxColour values conversion is not dependent on size of integer types, values range is specified

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@27624 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Václav Slavík
2004-06-04 15:57:04 +00:00
parent 654c02dc23
commit 3b9faf4c54
2 changed files with 4 additions and 2 deletions

View File

@@ -146,7 +146,8 @@ void wxColourRefData::AllocColour( GdkColormap *cmap )
#define M_COLDATA ((wxColourRefData *)m_refData) #define M_COLDATA ((wxColourRefData *)m_refData)
#define SHIFT (8*(sizeof(short int)-sizeof(char))) // GDK's values are in 0..65535 range, our are in 0..255
#define SHIFT 8
IMPLEMENT_DYNAMIC_CLASS(wxColour,wxGDIObject) IMPLEMENT_DYNAMIC_CLASS(wxColour,wxGDIObject)

View File

@@ -146,7 +146,8 @@ void wxColourRefData::AllocColour( GdkColormap *cmap )
#define M_COLDATA ((wxColourRefData *)m_refData) #define M_COLDATA ((wxColourRefData *)m_refData)
#define SHIFT (8*(sizeof(short int)-sizeof(char))) // GDK's values are in 0..65535 range, our are in 0..255
#define SHIFT 8
IMPLEMENT_DYNAMIC_CLASS(wxColour,wxGDIObject) IMPLEMENT_DYNAMIC_CLASS(wxColour,wxGDIObject)