]> git.saurik.com Git - wxWidgets.git/blobdiff - include/wx/dc.h
Some restructuring, beginning of wxDataViewDateCell.
[wxWidgets.git] / include / wx / dc.h
index e8cb0ab7160f24b0a5fc5bf14cfb68e972e5f237..e7683753d5a0262b14e96c2d9b1afbcd89c150d7 100644 (file)
@@ -136,8 +136,10 @@ public:
 
     ~wxDCBase() { }
 
-    virtual void BeginDrawing() { }
-    virtual void EndDrawing() { }
+#if WXWIN_COMPATIBILITY_2_6
+    wxDEPRECATED( virtual void BeginDrawing() );
+    wxDEPRECATED( virtual void EndDrawing() );
+#endif // WXWIN_COMPATIBILITY_2_6
 
     // graphic primitives
     // ------------------
@@ -156,6 +158,27 @@ public:
                    int style = wxFLOOD_SURFACE)
         { return DoFloodFill(pt.x, pt.y, col, style); }
 
+    // fill the area specified by rect with a radial gradient, starting from
+    // initialColour in the centre of the cercle and fading to destColour.
+    void GradientFillConcentric(const wxRect& rect,
+                                const wxColour& initialColour, 
+                                const wxColour& destColour)
+        { GradientFillConcentric(rect, initialColour, destColour,
+                                 wxPoint(rect.GetWidth() / 2,
+                                         rect.GetHeight() / 2)); }
+
+    void GradientFillConcentric(const wxRect& rect,
+                                const wxColour& initialColour, 
+                                const wxColour& destColour,
+                                const wxPoint& circleCenter);
+
+    // fill the area specified by rect with a linear gradient
+    void GradientFillLinear(const wxRect& rect,
+                            const wxColour& initialColour, 
+                            const wxColour& destColour,
+                            wxDirection nDirection = wxEAST)
+        { DoGradientFillLinear(rect, initialColour, destColour, nDirection); }
+
     bool GetPixel(wxCoord x, wxCoord y, wxColour *col) const
         { return DoGetPixel(x, y, col); }
     bool GetPixel(const wxPoint& pt, wxColour *col) const
@@ -643,6 +666,11 @@ protected:
     virtual bool DoFloodFill(wxCoord x, wxCoord y, const wxColour& col,
                              int style = wxFLOOD_SURFACE) = 0;
 
+    virtual void DoGradientFillLinear(const wxRect& rect,
+                                      const wxColour& initialColour,
+                                      const wxColour& destColour,
+                                      wxDirection nDirection = wxEAST);
+    
     virtual bool DoGetPixel(wxCoord x, wxCoord y, wxColour *col) const = 0;
 
     virtual void DoDrawPoint(wxCoord x, wxCoord y) = 0;
@@ -804,8 +832,10 @@ private:
     #include "wx/msw/dc.h"
 #elif defined(__WXMOTIF__)
     #include "wx/motif/dc.h"
-#elif defined(__WXGTK__)
+#elif defined(__WXGTK20__)
     #include "wx/gtk/dc.h"
+#elif defined(__WXGTK__)
+    #include "wx/gtk1/dc.h"
 #elif defined(__WXX11__)
     #include "wx/x11/dc.h"
 #elif defined(__WXMGL__)