]> git.saurik.com Git - wxWidgets.git/blobdiff - include/wx/dc.h
Line-up interfaces to use size_t for GetCount()s (and count related api).
[wxWidgets.git] / include / wx / dc.h
index 3546f82a1dd20eacc4ba9ac36a64f2161b8e6dad..acb004af104f0376e72162d9b92cdcbfcd6fa161 100644 (file)
 #ifndef _WX_DC_H_BASE_
 #define _WX_DC_H_BASE_
 
-#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
-    #pragma interface "dcbase.h"
-#endif
-
 // ----------------------------------------------------------------------------
 // headers which we must include here
 // ----------------------------------------------------------------------------
@@ -97,7 +93,7 @@ protected:
 // global variables
 // ---------------------------------------------------------------------------
 
-WXDLLEXPORT_DATA(extern int) wxPageNumber;
+extern WXDLLEXPORT_DATA(int) wxPageNumber;
 
 // ---------------------------------------------------------------------------
 // wxDC is the device context - object on which any drawing is done
@@ -140,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
     // ------------------
@@ -160,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
@@ -348,7 +367,7 @@ public:
      *  \param angle Rotating angle (counterclockwise, start at 3 o'clock, 360 is full circle).
      *  \param center Center of rotation.
      */
-    void Rotate( wxList* points, double angle, wxPoint center = wxPoint() );
+    void Rotate( wxList* points, double angle, wxPoint center = wxPoint(0,0) );
 
     // used by DrawEllipticArcRot
     // Careful: wxList gets filled with points you have to delete later.
@@ -636,6 +655,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;
@@ -797,8 +821,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__)