+ virtual void SetLogicalScale(double x, double y);
+ virtual void GetLogicalScale(double *x, double *y) const
+ {
+ if ( x ) *x = m_logicalScaleX;
+ if ( y ) *y = m_logicalScaleY;
+ }
+
+ virtual void SetLogicalOrigin(wxCoord x, wxCoord y);
+ virtual void DoGetLogicalOrigin(wxCoord *x, wxCoord *y) const
+ {
+ if ( x ) *x = m_logicalOriginX;
+ if ( y ) *y = m_logicalOriginY;
+ }
+
+ virtual void SetDeviceOrigin(wxCoord x, wxCoord y);
+ virtual void DoGetDeviceOrigin(wxCoord *x, wxCoord *y) const
+ {
+ if ( x ) *x = m_deviceOriginX;
+ if ( y ) *y = m_deviceOriginY;
+ }
+
+#if wxUSE_DC_TRANSFORM_MATRIX
+ // Transform matrix support is not available in most ports right now
+ // (currently only wxMSW provides it) so do nothing in these methods by
+ // default.
+ virtual bool CanUseTransformMatrix() const
+ { return false; }
+ virtual bool SetTransformMatrix(const wxAffineMatrix2D& WXUNUSED(matrix))
+ { return false; }
+ virtual wxAffineMatrix2D GetTransformMatrix() const
+ { return wxAffineMatrix2D(); }
+ virtual void ResetTransformMatrix()
+ { }
+#endif // wxUSE_DC_TRANSFORM_MATRIX
+
+ virtual void SetDeviceLocalOrigin( wxCoord x, wxCoord y );
+
+ virtual void ComputeScaleAndOrigin();
+
+ // this needs to overidden if the axis is inverted
+ virtual void SetAxisOrientation(bool xLeftRight, bool yBottomUp);
+
+#ifdef __WXMSW__
+ // Native Windows functions using the underlying HDC don't honour GDI+
+ // transformations which may be applied to it. Using this function we can
+ // transform the coordinates manually before passing them to such functions
+ // (as in e.g. wxRendererMSW code). It doesn't do anything if this is not a
+ // wxGCDC.
+ virtual wxRect MSWApplyGDIPlusTransform(const wxRect& r) const
+ {
+ return r;
+ }
+#endif // __WXMSW__
+
+
+ // ---------------------------------------------------------
+ // the actual drawing API
+
+ virtual bool DoFloodFill(wxCoord x, wxCoord y, const wxColour& col,
+ wxFloodFillStyle style = wxFLOOD_SURFACE) = 0;
+
+ virtual void DoGradientFillLinear(const wxRect& rect,
+ const wxColour& initialColour,
+ const wxColour& destColour,
+ wxDirection nDirection = wxEAST);
+
+ virtual void DoGradientFillConcentric(const wxRect& rect,
+ const wxColour& initialColour,
+ const wxColour& destColour,
+ const wxPoint& circleCenter);
+
+ virtual bool DoGetPixel(wxCoord x, wxCoord y, wxColour *col) const = 0;
+
+ virtual void DoDrawPoint(wxCoord x, wxCoord y) = 0;
+ virtual void DoDrawLine(wxCoord x1, wxCoord y1, wxCoord x2, wxCoord y2) = 0;
+
+ virtual void DoDrawArc(wxCoord x1, wxCoord y1,
+ wxCoord x2, wxCoord y2,
+ wxCoord xc, wxCoord yc) = 0;
+ virtual void DoDrawCheckMark(wxCoord x, wxCoord y,
+ wxCoord width, wxCoord height);
+ virtual void DoDrawEllipticArc(wxCoord x, wxCoord y, wxCoord w, wxCoord h,
+ double sa, double ea) = 0;
+
+ virtual void DoDrawRectangle(wxCoord x, wxCoord y, wxCoord width, wxCoord height) = 0;
+ virtual void DoDrawRoundedRectangle(wxCoord x, wxCoord y,
+ wxCoord width, wxCoord height,
+ double radius) = 0;
+ virtual void DoDrawEllipse(wxCoord x, wxCoord y,
+ wxCoord width, wxCoord height) = 0;
+
+ virtual void DoCrossHair(wxCoord x, wxCoord y) = 0;
+
+ virtual void DoDrawIcon(const wxIcon& icon, wxCoord x, wxCoord y) = 0;
+ virtual void DoDrawBitmap(const wxBitmap &bmp, wxCoord x, wxCoord y,
+ bool useMask = false) = 0;
+
+ virtual void DoDrawText(const wxString& text, wxCoord x, wxCoord y) = 0;
+ virtual void DoDrawRotatedText(const wxString& text,
+ wxCoord x, wxCoord y, double angle) = 0;
+
+ virtual bool DoBlit(wxCoord xdest, wxCoord ydest,
+ wxCoord width, wxCoord height,
+ wxDC *source,
+ wxCoord xsrc, wxCoord ysrc,
+ wxRasterOperationMode rop = wxCOPY,
+ bool useMask = false,
+ wxCoord xsrcMask = wxDefaultCoord,
+ wxCoord ysrcMask = wxDefaultCoord) = 0;
+
+ virtual bool DoStretchBlit(wxCoord xdest, wxCoord ydest,
+ wxCoord dstWidth, wxCoord dstHeight,
+ wxDC *source,
+ wxCoord xsrc, wxCoord ysrc,
+ wxCoord srcWidth, wxCoord srcHeight,
+ wxRasterOperationMode rop = wxCOPY,
+ bool useMask = false,
+ wxCoord xsrcMask = wxDefaultCoord,
+ wxCoord ysrcMask = wxDefaultCoord);
+
+ virtual wxBitmap DoGetAsBitmap(const wxRect *WXUNUSED(subrect)) const
+ { return wxNullBitmap; }
+
+
+ virtual void DoDrawLines(int n, wxPoint points[],
+ wxCoord xoffset, wxCoord yoffset ) = 0;
+ virtual void DrawLines(const wxPointList *list,
+ wxCoord xoffset, wxCoord yoffset );
+
+ virtual void DoDrawPolygon(int n, wxPoint points[],
+ wxCoord xoffset, wxCoord yoffset,
+ wxPolygonFillMode fillStyle = wxODDEVEN_RULE) = 0;
+ virtual void DoDrawPolyPolygon(int n, int count[], wxPoint points[],
+ wxCoord xoffset, wxCoord yoffset,
+ wxPolygonFillMode fillStyle);
+ void DrawPolygon(const wxPointList *list,
+ wxCoord xoffset, wxCoord yoffset,
+ wxPolygonFillMode fillStyle );
+
+