X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/6e711d5c093dcc758e3f1670caf845612ea9fa92..3f0fb1d4165f622ab392a28c1a08a975aa7c5378:/include/wx/dc.h diff --git a/include/wx/dc.h b/include/wx/dc.h index 1a7283aab7..c14bbea8ae 100644 --- a/include/wx/dc.h +++ b/include/wx/dc.h @@ -28,7 +28,6 @@ #include "wx/brush.h" #include "wx/pen.h" #include "wx/palette.h" - #include "wx/list.h" // we use wxList in inline functions class WXDLLEXPORT wxDCBase; @@ -148,12 +147,12 @@ public: CalcBoundingBox(drawobject->MaxX(),drawobject->MaxY()); } - void FloodFill(wxCoord x, wxCoord y, const wxColour& col, + bool FloodFill(wxCoord x, wxCoord y, const wxColour& col, int style = wxFLOOD_SURFACE) - { DoFloodFill(x, y, col, style); } - void FloodFill(const wxPoint& pt, const wxColour& col, + { return DoFloodFill(x, y, col, style); } + bool FloodFill(const wxPoint& pt, const wxColour& col, int style = wxFLOOD_SURFACE) - { DoFloodFill(pt.x, pt.y, col, style); } + { return DoFloodFill(pt.x, pt.y, col, style); } bool GetPixel(wxCoord x, wxCoord y, wxColour *col) const { return DoGetPixel(x, y, col); } @@ -227,6 +226,9 @@ public: void DrawCircle(wxCoord x, wxCoord y, wxCoord radius) { DoDrawEllipse(x - radius, y - radius, 2*radius, 2*radius); } + void DrawCircle(const wxPoint& pt, wxCoord radius) + { DrawCircle(pt.x, pt.y, radius); } + void DrawEllipse(wxCoord x, wxCoord y, wxCoord width, wxCoord height) { DoDrawEllipse(x, y, width, height); } void DrawEllipse(const wxPoint& pt, const wxSize& sz) @@ -316,7 +318,9 @@ public: virtual void SetBrush(const wxBrush& brush) = 0; virtual void SetBackground(const wxBrush& brush) = 0; virtual void SetBackgroundMode(int mode) = 0; +#if wxUSE_PALETTE virtual void SetPalette(const wxPalette& palette) = 0; +#endif // wxUSE_PALETTE // clipping region // --------------- @@ -588,17 +592,22 @@ public: #endif // !Win16 #if WXWIN_COMPATIBILITY + +#if wxUSE_PALETTE virtual void SetColourMap(const wxPalette& palette) { SetPalette(palette); } +#endif // wxUSE_PALETTE + void GetTextExtent(const wxString& string, float *x, float *y, float *descent = NULL, float *externalLeading = NULL, wxFont *theFont = NULL, bool use16bit = FALSE) const ; void GetSize(float* width, float* height) const { int w, h; GetSize(& w, & h); *width = w; *height = h; } void GetSizeMM(float *width, float *height) const { long w, h; GetSizeMM(& w, & h); *width = (float) w; *height = (float) h; } + #endif // WXWIN_COMPATIBILITY protected: // the pure virtual functions which should be implemented by wxDC - virtual void DoFloodFill(wxCoord x, wxCoord y, const wxColour& col, + virtual bool DoFloodFill(wxCoord x, wxCoord y, const wxColour& col, int style = wxFLOOD_SURFACE) = 0; virtual bool DoGetPixel(wxCoord x, wxCoord y, wxColour *col) const = 0; @@ -731,7 +740,11 @@ protected: wxColour m_textForegroundColour; wxColour m_textBackgroundColour; wxFont m_font; + +#if wxUSE_PALETTE wxPalette m_palette; + bool m_hasCustomPalette; +#endif // wxUSE_PALETTE private: DECLARE_NO_COPY_CLASS(wxDCBase) @@ -748,6 +761,8 @@ private: #include "wx/motif/dc.h" #elif defined(__WXGTK__) #include "wx/gtk/dc.h" +#elif defined(__WXX11__) + #include "wx/x11/dc.h" #elif defined(__WXMGL__) #include "wx/mgl/dc.h" #elif defined(__WXMAC__)