+#ifdef __WXGTK3__
+ wxColourRefData(const GdkRGBA& gdkRGBA)
+ : m_gdkRGBA(gdkRGBA)
+ {
+ m_gdkColor.red = guint16(gdkRGBA.red * 65535);
+ m_gdkColor.green = guint16(gdkRGBA.green * 65535);
+ m_gdkColor.blue = guint16(gdkRGBA.blue * 65535);
+ m_alpha = wxByte(gdkRGBA.alpha * 255 + 0.5);
+ }
+ wxColourRefData(const GdkColor& gdkColor)
+ : m_gdkColor(gdkColor)
+ {
+ m_gdkRGBA.red = gdkColor.red / 65535.0;
+ m_gdkRGBA.green = gdkColor.green / 65535.0;
+ m_gdkRGBA.blue = gdkColor.blue / 65535.0;
+ m_gdkRGBA.alpha = 1;
+ m_alpha = 255;
+ }
+ wxColourRefData(guchar red, guchar green, guchar blue, guchar alpha)
+ {
+ m_gdkRGBA.red = red / 255.0;
+ m_gdkRGBA.green = green / 255.0;
+ m_gdkRGBA.blue = blue / 255.0;
+ m_gdkRGBA.alpha = alpha / 255.0;
+ m_gdkColor.red = (guint16(red) << 8) + red;
+ m_gdkColor.green = (guint16(green) << 8) + green;
+ m_gdkColor.blue = (guint16(blue) << 8) + blue;
+ m_alpha = alpha;
+ }
+ GdkRGBA m_gdkRGBA;
+ GdkColor m_gdkColor;
+#else