]> git.saurik.com Git - wxWidgets.git/blobdiff - src/os2/colour.cpp
don't allocate system fonts/colours dynamically
[wxWidgets.git] / src / os2 / colour.cpp
index a5e9556dac285940a5a1f07a91bf98991b0c2ec5..b9bd2f6bc3fe42b02a674766b990527c768f9e9e 100644 (file)
 // For compilers that support precompilation, includes "wx.h".
 #include "wx/wxprec.h"
 
+#ifndef WX_PRECOMP
+    #include "wx/colour.h"
+#endif
+
 #include "wx/gdicmn.h"
 #define INCL_GPI
 #define INCL_PM
@@ -38,7 +42,7 @@ wxColour::wxColour (
     m_cGreen  = cGreen;
     m_cBlue   = cBlue;
     m_bIsInit = TRUE;
-    m_vPixel  = PALETTERGB (m_cRed, m_cGreen, m_cBlue);
+    m_vPixel  = OS2RGB (m_cRed, m_cGreen, m_cBlue);
 } // end of wxColour::wxColour
 
 wxColour::wxColour (
@@ -84,7 +88,7 @@ void wxColour::InitFromName(
         m_cBlue = 0;
         m_bIsInit = FALSE;
     }
-    m_vPixel = PALETTERGB (m_cRed, m_cGreen, m_cBlue);
+    m_vPixel = OS2RGB (m_cRed, m_cGreen, m_cBlue);
 } // end of wxColour::InitFromName
 
 wxColour::~wxColour ()
@@ -101,22 +105,5 @@ void wxColour::Set (
     m_cGreen  = cGreen;
     m_cBlue   = cBlue;
     m_bIsInit = TRUE;
-    m_vPixel  = PALETTERGB (m_cRed, m_cGreen, m_cBlue);
+    m_vPixel  = OS2RGB (m_cRed, m_cGreen, m_cBlue);
 } // end of wxColour::Set
-
-//
-// Obsolete
-//
-#if WXWIN_COMPATIBILITY
-void wxColour::Get (
-  unsigned char*                   pRed
-, unsigned char*                   pGreen
-, unsigned char*                   pBlue
-) const
-{
-    *Red   = m_cRed;
-    *Green = m_cGreen;
-    *Blue  = m_cBlue;
-} // end of wxColour::Get
-#endif
-