+ bool GetPixel(wxCoord x, wxCoord y, wxColour *col) const
+ { return m_pimpl->DoGetPixel(x, y, col); }
+ bool GetPixel(const wxPoint& pt, wxColour *col) const
+ { return m_pimpl->DoGetPixel(pt.x, pt.y, col); }
+
+ void DrawLine(wxCoord x1, wxCoord y1, wxCoord x2, wxCoord y2)
+ { m_pimpl->DoDrawLine(x1, y1, x2, y2); }
+ void DrawLine(const wxPoint& pt1, const wxPoint& pt2)
+ { m_pimpl->DoDrawLine(pt1.x, pt1.y, pt2.x, pt2.y); }
+
+ void CrossHair(wxCoord x, wxCoord y)
+ { m_pimpl->DoCrossHair(x, y); }
+ void CrossHair(const wxPoint& pt)
+ { m_pimpl->DoCrossHair(pt.x, pt.y); }
+
+ void DrawArc(wxCoord x1, wxCoord y1, wxCoord x2, wxCoord y2,
+ wxCoord xc, wxCoord yc)
+ { m_pimpl->DoDrawArc(x1, y1, x2, y2, xc, yc); }
+ void DrawArc(const wxPoint& pt1, const wxPoint& pt2, const wxPoint& centre)
+ { m_pimpl->DoDrawArc(pt1.x, pt1.y, pt2.x, pt2.y, centre.x, centre.y); }
+
+ void DrawCheckMark(wxCoord x, wxCoord y,
+ wxCoord width, wxCoord height)
+ { m_pimpl->DoDrawCheckMark(x, y, width, height); }
+ void DrawCheckMark(const wxRect& rect)
+ { m_pimpl->DoDrawCheckMark(rect.x, rect.y, rect.width, rect.height); }
+
+ void DrawEllipticArc(wxCoord x, wxCoord y, wxCoord w, wxCoord h,
+ double sa, double ea)
+ { m_pimpl->DoDrawEllipticArc(x, y, w, h, sa, ea); }
+ void DrawEllipticArc(const wxPoint& pt, const wxSize& sz,
+ double sa, double ea)
+ { m_pimpl->DoDrawEllipticArc(pt.x, pt.y, sz.x, sz.y, sa, ea); }
+
+ void DrawPoint(wxCoord x, wxCoord y)
+ { m_pimpl->DoDrawPoint(x, y); }
+ void DrawPoint(const wxPoint& pt)
+ { m_pimpl->DoDrawPoint(pt.x, pt.y); }
+
+ void DrawLines(int n, wxPoint points[],
+ wxCoord xoffset = 0, wxCoord yoffset = 0)
+ { m_pimpl->DoDrawLines(n, points, xoffset, yoffset); }
+ void DrawLines(const wxList *list,
+ wxCoord xoffset = 0, wxCoord yoffset = 0)
+ { m_pimpl->DrawLines( list, xoffset, yoffset ); }
+
+ void DrawPolygon(int n, wxPoint points[],
+ wxCoord xoffset = 0, wxCoord yoffset = 0,
+ int fillStyle = wxODDEVEN_RULE)
+ { m_pimpl->DoDrawPolygon(n, points, xoffset, yoffset, fillStyle); }
+
+ void DrawPolygon(const wxList *list,
+ wxCoord xoffset = 0, wxCoord yoffset = 0,
+ int fillStyle = wxODDEVEN_RULE)
+ { m_pimpl->DrawPolygon( list, xoffset, yoffset, fillStyle ); }
+
+ void DrawPolyPolygon(int n, int count[], wxPoint points[],
+ wxCoord xoffset = 0, wxCoord yoffset = 0,
+ int fillStyle = wxODDEVEN_RULE)
+ { m_pimpl->DoDrawPolyPolygon(n, count, points, xoffset, yoffset, fillStyle); }
+
+ void DrawRectangle(wxCoord x, wxCoord y, wxCoord width, wxCoord height)
+ { m_pimpl->DoDrawRectangle(x, y, width, height); }
+ void DrawRectangle(const wxPoint& pt, const wxSize& sz)
+ { m_pimpl->DoDrawRectangle(pt.x, pt.y, sz.x, sz.y); }
+ void DrawRectangle(const wxRect& rect)
+ { m_pimpl->DoDrawRectangle(rect.x, rect.y, rect.width, rect.height); }
+
+ void DrawRoundedRectangle(wxCoord x, wxCoord y, wxCoord width, wxCoord height,
+ double radius)
+ { m_pimpl->DoDrawRoundedRectangle(x, y, width, height, radius); }
+ void DrawRoundedRectangle(const wxPoint& pt, const wxSize& sz,
+ double radius)
+ { m_pimpl->DoDrawRoundedRectangle(pt.x, pt.y, sz.x, sz.y, radius); }
+ void DrawRoundedRectangle(const wxRect& r, double radius)
+ { m_pimpl->DoDrawRoundedRectangle(r.x, r.y, r.width, r.height, radius); }
+
+ void DrawCircle(wxCoord x, wxCoord y, wxCoord radius)
+ { m_pimpl->DoDrawEllipse(x - radius, y - radius, 2*radius, 2*radius); }
+ void DrawCircle(const wxPoint& pt, wxCoord radius)
+ { m_pimpl->DrawCircle(pt.x, pt.y, radius); }
+
+ void DrawEllipse(wxCoord x, wxCoord y, wxCoord width, wxCoord height)
+ { m_pimpl->DoDrawEllipse(x, y, width, height); }
+ void DrawEllipse(const wxPoint& pt, const wxSize& sz)
+ { m_pimpl->DoDrawEllipse(pt.x, pt.y, sz.x, sz.y); }
+ void DrawEllipse(const wxRect& rect)
+ { m_pimpl->DoDrawEllipse(rect.x, rect.y, rect.width, rect.height); }
+
+ void DrawIcon(const wxIcon& icon, wxCoord x, wxCoord y)
+ { m_pimpl->DoDrawIcon(icon, x, y); }
+ void DrawIcon(const wxIcon& icon, const wxPoint& pt)
+ { m_pimpl->DoDrawIcon(icon, pt.x, pt.y); }
+
+ void DrawBitmap(const wxBitmap &bmp, wxCoord x, wxCoord y,
+ bool useMask = false)
+ { m_pimpl->DoDrawBitmap(bmp, x, y, useMask); }
+ void DrawBitmap(const wxBitmap &bmp, const wxPoint& pt,
+ bool useMask = false)
+ { m_pimpl->DoDrawBitmap(bmp, pt.x, pt.y, useMask); }
+
+ void DrawText(const wxString& text, wxCoord x, wxCoord y)
+ { m_pimpl->DoDrawText(text, x, y); }
+ void DrawText(const wxString& text, const wxPoint& pt)
+ { m_pimpl->DoDrawText(text, pt.x, pt.y); }
+
+ void DrawRotatedText(const wxString& text, wxCoord x, wxCoord y, double angle)
+ { m_pimpl->DoDrawRotatedText(text, x, y, angle); }
+ void DrawRotatedText(const wxString& text, const wxPoint& pt, double angle)
+ { m_pimpl->DoDrawRotatedText(text, pt.x, pt.y, angle); }
+
+ // this version puts both optional bitmap and the text into the given
+ // rectangle and aligns is as specified by alignment parameter; it also
+ // will emphasize the character with the given index if it is != -1 and
+ // return the bounding rectangle if required
+ void DrawLabel(const wxString& text,
+ const wxBitmap& image,
+ const wxRect& rect,
+ int alignment = wxALIGN_LEFT | wxALIGN_TOP,
+ int indexAccel = -1,
+ wxRect *rectBounding = NULL)
+ { m_pimpl->DrawLabel( text, image, rect, alignment, indexAccel, rectBounding ); }
+
+ void DrawLabel(const wxString& text, const wxRect& rect,
+ int alignment = wxALIGN_LEFT | wxALIGN_TOP,
+ int indexAccel = -1)
+ { m_pimpl->DrawLabel(text, wxNullBitmap, rect, alignment, indexAccel); }
+
+ bool Blit(wxCoord xdest, wxCoord ydest, wxCoord width, wxCoord height,
+ wxDC *source, wxCoord xsrc, wxCoord ysrc,
+ int rop = wxCOPY, bool useMask = false, wxCoord xsrcMask = wxDefaultCoord, wxCoord ysrcMask = wxDefaultCoord)
+ {
+ return m_pimpl->DoBlit(xdest, ydest, width, height,
+ source, xsrc, ysrc, rop, useMask, xsrcMask, ysrcMask);
+ }
+ bool Blit(const wxPoint& destPt, const wxSize& sz,
+ wxDC *source, const wxPoint& srcPt,
+ int rop = wxCOPY, bool useMask = false, const wxPoint& srcPtMask = wxDefaultPosition)
+ {
+ return m_pimpl->DoBlit(destPt.x, destPt.y, sz.x, sz.y,
+ source, srcPt.x, srcPt.y, rop, useMask, srcPtMask.x, srcPtMask.y);
+ }
+
+ bool StretchBlit(wxCoord dstX, wxCoord dstY,
+ wxCoord dstWidth, wxCoord dstHeight,
+ wxDC *source,
+ wxCoord srcX, wxCoord srcY,
+ wxCoord srcWidth, wxCoord srcHeight,
+ int rop = wxCOPY, bool useMask = false,
+ wxCoord srcMaskX = wxDefaultCoord, wxCoord srcMaskY = wxDefaultCoord)
+ {
+ return m_pimpl->DoStretchBlit(dstX, dstY, dstWidth, dstHeight,
+ source, srcX, srcY, srcWidth, srcHeight, rop, useMask, srcMaskX, srcMaskY);
+ }
+ bool StretchBlit(const wxPoint& dstPt, const wxSize& dstSize,
+ wxDC *source, const wxPoint& srcPt, const wxSize& srcSize,
+ int rop = wxCOPY, bool useMask = false, const wxPoint& srcMaskPt = wxDefaultPosition)
+ {
+ return m_pimpl->DoStretchBlit(dstPt.x, dstPt.y, dstSize.x, dstSize.y,
+ source, srcPt.x, srcPt.y, srcSize.x, srcSize.y, rop, useMask, srcMaskPt.x, srcMaskPt.y);
+ }
+
+ wxBitmap GetAsBitmap(const wxRect *subrect = (const wxRect *) NULL) const
+ {
+ return m_pimpl->DoGetAsBitmap(subrect);
+ }
+
+#if wxUSE_SPLINES
+ // TODO: this API needs fixing (wxPointList, why (!const) "wxList *"?)
+ void DrawSpline(wxCoord x1, wxCoord y1,
+ wxCoord x2, wxCoord y2,
+ wxCoord x3, wxCoord y3)
+ { m_pimpl->DrawSpline(x1,y1,x2,y2,x3,y3); }
+ void DrawSpline(int n, wxPoint points[])
+ { m_pimpl->DrawSpline(n,points); }
+
+ void DrawSpline(wxList *points)
+ { m_pimpl->DoDrawSpline(points); }
+#endif // wxUSE_SPLINES
+
+
+#if WXWIN_COMPATIBILITY_2_8
+ // for compatibility with the old code when wxCoord was long everywhere
+ wxDEPRECATED( void GetTextExtent(const wxString& string,
+ long *x, long *y,
+ long *descent = NULL,
+ long *externalLeading = NULL,
+ const wxFont *theFont = NULL) const );
+ wxDEPRECATED( void GetLogicalOrigin(long *x, long *y) const );
+ wxDEPRECATED( void GetDeviceOrigin(long *x, long *y) const );
+ wxDEPRECATED( void GetClippingBox(long *x, long *y, long *w, long *h) const );
+#endif // WXWIN_COMPATIBILITY_2_8
+
+
+protected:
+ wxImplDC *m_pimpl;
+
+private:
+ DECLARE_ABSTRACT_CLASS(wxImplDC)
+}
+
+
+#else // wxUSE_NEW_DC