-class WXDLLEXPORT wxDC;
-WX_DECLARE_LIST(wxDC, wxCocoaDCStack);
+DECLARE_WXCOCOA_OBJC_CLASS(NSAffineTransform);
+
+#include "wx/dc.h"
+
+class WXDLLIMPEXP_FWD_CORE wxCocoaDCImpl;
+WX_DECLARE_LIST(wxCocoaDCImpl, wxCocoaDCStack);
//=========================================================================
// wxDC
//=========================================================================
//=========================================================================
// wxDC
//=========================================================================
//-------------------------------------------------------------------------
// Initialization
//-------------------------------------------------------------------------
public:
//-------------------------------------------------------------------------
// Initialization
//-------------------------------------------------------------------------
public:
static WX_NSTextStorage sm_cocoaNSTextStorage;
static WX_NSLayoutManager sm_cocoaNSLayoutManager;
static WX_NSTextContainer sm_cocoaNSTextContainer;
static WX_NSTextStorage sm_cocoaNSTextStorage;
static WX_NSLayoutManager sm_cocoaNSLayoutManager;
static WX_NSTextContainer sm_cocoaNSTextContainer;
void CocoaUnwindStackAndLoseFocus();
// DC flipping/transformation
void CocoaApplyTransformations();
void CocoaUnwindStackAndLoseFocus();
// DC flipping/transformation
void CocoaApplyTransformations();
- float m_cocoaHeight;
- bool m_cocoaFlipped;
+ void CocoaUnapplyTransformations();
+ WX_NSAffineTransform m_cocoaWxToBoundsTransform;
+// Get bounds rect (for Clear())
+ // note: we use void * to mean NSRect * so that we can avoid
+ // putting NSRect in the headers.
+ virtual bool CocoaGetBounds(void *rectData);
// Blitting
virtual bool CocoaDoBlitOnFocusedDC(wxCoord xdest, wxCoord ydest,
wxCoord width, wxCoord height, wxCoord xsrc, wxCoord ysrc,
// Blitting
virtual bool CocoaDoBlitOnFocusedDC(wxCoord xdest, wxCoord ydest,
wxCoord width, wxCoord height, wxCoord xsrc, wxCoord ysrc,
- int logicalFunc, bool useMask, wxCoord xsrcMask, wxCoord ysrcMask);
+ wxRasterOperationMode logicalFunc, bool useMask, wxCoord xsrcMask, wxCoord ysrcMask);
//-------------------------------------------------------------------------
// Implementation
//-------------------------------------------------------------------------
//-------------------------------------------------------------------------
// Implementation
//-------------------------------------------------------------------------
virtual void SetPen(const wxPen& pen);
virtual void SetBrush(const wxBrush& brush);
virtual void SetBackground(const wxBrush& brush);
virtual void SetPen(const wxPen& pen);
virtual void SetBrush(const wxBrush& brush);
virtual void SetBackground(const wxBrush& brush);
virtual bool CanDrawBitmap() const;
virtual bool CanGetTextExtent() const;
virtual int GetDepth() const;
virtual wxSize GetPPI() const;
virtual bool CanDrawBitmap() const;
virtual bool CanGetTextExtent() const;
virtual int GetDepth() const;
virtual wxSize GetPPI() const;
virtual void SetUserScale(double x, double y);
virtual void SetLogicalScale(double x, double y);
virtual void SetLogicalOrigin(wxCoord x, wxCoord y);
virtual void SetDeviceOrigin(wxCoord x, wxCoord y);
virtual void SetAxisOrientation(bool xLeftRight, bool yBottomUp);
virtual void SetUserScale(double x, double y);
virtual void SetLogicalScale(double x, double y);
virtual void SetLogicalOrigin(wxCoord x, wxCoord y);
virtual void SetDeviceOrigin(wxCoord x, wxCoord y);
virtual void SetAxisOrientation(bool xLeftRight, bool yBottomUp);
virtual void SetTextForeground(const wxColour& colour) ;
virtual void SetTextBackground(const wxColour& colour) ;
virtual void SetTextForeground(const wxColour& colour) ;
virtual void SetTextBackground(const wxColour& colour) ;
virtual void ComputeScaleAndOrigin();
protected:
virtual bool DoFloodFill(wxCoord x, wxCoord y, const wxColour& col,
virtual void ComputeScaleAndOrigin();
protected:
virtual bool DoFloodFill(wxCoord x, wxCoord y, const wxColour& col,
// this is gnarly - we can't even call this function DoSetClippingRegion()
// because of virtual function hiding
// this is gnarly - we can't even call this function DoSetClippingRegion()
// because of virtual function hiding
virtual void DoSetClippingRegion(wxCoord x, wxCoord y,
wxCoord width, wxCoord height);
virtual void DoSetClippingRegion(wxCoord x, wxCoord y,
wxCoord width, wxCoord height);
wxCoord xoffset, wxCoord yoffset);
virtual void DoDrawPolygon(int n, wxPoint points[],
wxCoord xoffset, wxCoord yoffset,
wxCoord xoffset, wxCoord yoffset);
virtual void DoDrawPolygon(int n, wxPoint points[],
wxCoord xoffset, wxCoord yoffset,