From cc33ae725d8338fbb499490b69c96968c8fac9cb Mon Sep 17 00:00:00 2001 From: Robin Dunn Date: Thu, 13 Jun 2013 07:26:41 +0000 Subject: [PATCH] Add some missing wxGraphicsContext methods git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74228 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- interface/wx/graphics.h | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) diff --git a/interface/wx/graphics.h b/interface/wx/graphics.h index 4d72e60e64..a8ebbabd67 100644 --- a/interface/wx/graphics.h +++ b/interface/wx/graphics.h @@ -847,10 +847,48 @@ public: virtual void PopState() = 0; + virtual bool ShouldOffset() const; virtual void EnableOffset(bool enable = true); void DisableOffset(); bool OffsetEnabled(); + /** + Begin a new document (relevant only for printing / pdf etc.) + If there is a progress dialog, message will be shown. + */ + virtual bool StartDoc( const wxString& message ); + + /** + Done with that document (relevant only for printing / pdf etc.) + */ + virtual void EndDoc(); + + /** + Opens a new page (relevant only for printing / pdf etc.) with the given + size in points. (If both are null the default page size will be used.) + */ + virtual void StartPage( wxDouble width = 0, wxDouble height = 0 ); + + /** + Ends the current page (relevant only for printing / pdf etc.) + */ + virtual void EndPage(); + + /** + Make sure that the current content of this context is immediately visible. + */ + virtual void Flush(); + + /** + Returns the size of the graphics context in device coordinates. + */ + void GetSize(wxDouble* width, wxDouble* height) const; + + /** + Returns the resolution of the graphics context in device points per inch. + */ + virtual void GetDPI( wxDouble* dpiX, wxDouble* dpiY); + }; /** -- 2.47.2