+
+ /**
+ Redirects all rendering is done into a fully transparent temporary context
+ */
+ virtual void BeginLayer(wxDouble opacity) = 0;
+
+ /**
+ Composites back the drawings into the context with the opacity given at
+ the BeginLayer call
+ */
+ virtual void EndLayer() = 0;
+
+ /**
+ Sets the antialiasing mode, returns true if it supported
+ */
+ virtual bool SetAntialiasMode(wxAntialiasMode antialias) = 0;
+
+ /**
+ Returns the current shape antialiasing mode
+ */
+ virtual wxAntialiasMode GetAntialiasMode() const ;
+
+ /**
+ Sets the interpolation quality, returns true if it is supported.
+
+ Not implemented in Cairo backend currently.
+ */
+ virtual bool SetInterpolationQuality(wxInterpolationQuality interpolation) = 0;
+
+ /**
+ Returns the current interpolation quality.
+ */
+ virtual wxInterpolationQuality GetInterpolationQuality() const;
+
+ /**
+ Sets the compositing operator, returns true if it supported
+ */
+ virtual bool SetCompositionMode(wxCompositionMode op) = 0;
+
+ /**
+ Returns the current compositing operator
+ */
+ virtual wxCompositionMode GetCompositionMode() const;
+
+
+ /**
+ Push the current state of the context's transformation matrix on a
+ stack.
+
+ @see wxGraphicsContext::PopState
+ */
+ virtual void PushState() = 0;
+
+ /**
+ Pops a stored state from the stack and sets the current transformation
+ matrix to that state.
+
+ @see wxGraphicsContext::PopState
+ */
+ 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);
+
+};
+
+/**
+ Represents a single gradient stop in a collection of gradient stops as
+ represented by wxGraphicsGradientStops.
+
+ @library{wxcore}
+ @category{gdi}
+
+ @since 2.9.1
+*/
+class wxGraphicsGradientStop
+{
+public:
+ /**
+ Creates a stop with the given colour and position.
+
+ @param col The colour of this stop. Note that the alpha component of
+ the colour is honoured thus allowing the background colours to
+ partially show through the gradient.
+ @param pos The stop position, must be in [0, 1] range with 0 being the
+ beginning and 1 the end of the gradient.
+ */
+ wxGraphicsGradientStop(wxColour col = wxTransparentColour, float pos = 0.);
+
+ /// Return the stop colour.
+ const wxColour& GetColour() const;
+
+ /**
+ Change the stop colour.
+
+ @param col The new colour.
+ */
+ void SetColour(const wxColour& col);
+
+ /// Return the stop position.
+ float GetPosition() const;
+
+ /**
+ Change the stop position.
+
+ @param pos The new position, must always be in [0, 1] range.
+ */
+ void SetPosition(float pos);