]> git.saurik.com Git - wxWidgets.git/commitdiff
possible fix for templates with digitalmars
authorChris Elliott <biol75@york.ac.uk>
Tue, 6 May 2003 15:08:52 +0000 (15:08 +0000)
committerChris Elliott <biol75@york.ac.uk>
Tue, 6 May 2003 15:08:52 +0000 (15:08 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@20502 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

include/wx/platform.h
include/wx/rawbmp.h

index dfcbfb232954988a18f14f60712c9e2c83e1e753..24d8e5a99f0d0174524accf2087c763da9a837c3 100644 (file)
 #endif
 
 #if defined (__WXMSW__)
-    #if !defined(__DIGITALMARS__) && !defined(__WATCOMC__)
+    #if !defined(__WATCOMC__)
         #define wxHAVE_RAW_BITMAP
     #endif
 #endif
index 2d43d81e299fac6f1499e1e539257ed881c033fb..a9199e541cb8e403275391fb55b3c97cda40a554 100644 (file)
         - index of the alpha component or -1 if none
         - type which can contain the full pixel value (all channels)
  */
+
+#ifdef __DIGITALMARS__
+template <class Channel,
+          size_t Bpp, int R, int G, int B, int A = -1,
+          class Pixel = wxUint32>
+#else
 template <typename Channel,
           size_t Bpp, int R, int G, int B, int A = -1,
           typename Pixel = wxUint32>
+#endif
+          
 struct WXDLLEXPORT wxPixelFormat
 {
     // iterator over pixels is usually of type "ChannelType *"
@@ -621,6 +629,28 @@ struct WXDLLEXPORT wxPixelDataOut<wxBitmap>
     };
 };
 
+#ifdef __DIGITALMARS__
+template <class Image, class PixelFormat = wxPixelFormatFor<Image> >
+class wxPixelData :
+    public wxPixelDataOut<Image>:: wxPixelDataIn<PixelFormat>
+{
+public:
+    wxPixelData(Image& image)
+        : wxPixelDataOut<Image>:: wxPixelDataIn<PixelFormat>(image)
+        {
+        }
+
+    wxPixelData(Image& i, const wxPoint& pt, const wxSize& sz)
+        : wxPixelDataOut<Image>:: wxPixelDataIn<PixelFormat>(i, pt, sz)
+        {
+        }
+
+    wxPixelData(Image& i, const wxRect& rect)
+        : wxPixelDataOut<Image>:: wxPixelDataIn<PixelFormat>(i, rect)
+        {
+        }
+};
+#else // not __DIGITALMARS__
 template <class Image, class PixelFormat = wxPixelFormatFor<Image> >
 class wxPixelData :
     public wxPixelDataOut<Image>::template wxPixelDataIn<PixelFormat>
@@ -641,6 +671,7 @@ public:
         {
         }
 };
+#endif // __DIGITALMARS__
 
 // some "predefined" pixel data classes
 typedef wxPixelData<wxImage> wxImagePixelData;