Version: 3.3.4
Loading...
Searching...
No Matches
wxSVGGraphicsRenderer Class Reference

#include <wx/svggc.h>

Inheritance diagram for wxSVGGraphicsRenderer:

Detailed Description

The renderer used to create wxSVGGraphicsContext objects.

This renderer is a singleton and is used by wxGraphicsContext::Create() when a wxSVGFileDC is passed to it.

Library:  wxCore
Category:  Graphics Device Interface (GDI)
Since
3.3.3

Public Member Functions

virtual wxString GetName () const override
 Returns the name of the renderer, which is always "svg".
virtual void GetVersion (int *major, int *minor=nullptr, int *micro=nullptr) const override
 Returns the version of the SVG specification targeted by this renderer (currently 1.0).
Context creation
virtual wxGraphicsContext * CreateContext (const wxWindowDC &dc) override
 This method is not supported by the SVG renderer and always returns nullptr.
virtual wxGraphicsContext * CreateContext (const wxMemoryDC &dc) override
 This method is not supported by the SVG renderer and always returns nullptr.
virtual wxGraphicsContext * CreateContext (const wxPrinterDC &dc) override
 This method is not supported by the SVG renderer and always returns nullptr.
virtual wxGraphicsContext * CreateContextFromNativeContext (void *context) override
 This method is not supported by the SVG renderer and always returns nullptr.
virtual wxGraphicsContext * CreateContextFromNativeWindow (void *window) override
 This method is not supported by the SVG renderer and always returns nullptr.
virtual wxGraphicsContext * CreateContext (wxWindow *window) override
 This method is not supported by the SVG renderer and always returns nullptr.
virtual wxGraphicsContext * CreateContextFromImage (wxImage &image) override
 This method is not supported by the SVG renderer and always returns nullptr.
wxGraphicsContext * CreateContext (wxSVGFileDC &dc)
 Creates a graphics context that draws into the given SVG DC.
wxGraphicsContext * CreateContext (const wxString &filename, int width=320, int height=240, double dpi=wxSVG_DEFAULT_DPI, const wxString &title=wxString())
 Creates a graphics context that draws into the given file.
wxGraphicsContext * CreateContext (const wxSize &size, const wxString &filename=wxString(), const wxString &title=wxString(), double dpi=wxSVG_DEFAULT_DPI)
 Creates a graphics context that draws into the given file.
virtual wxGraphicsContext * CreateMeasuringContext () override
 This method is not supported by the SVG renderer and always returns nullptr.
Public Member Functions inherited from wxGraphicsRenderer
virtual wxGraphicsBitmap CreateBitmap (const wxBitmap &bitmap)=0
 Creates wxGraphicsBitmap from an existing wxBitmap.
virtual wxGraphicsBitmap CreateBitmapFromImage (const wxImage &image)=0
 Creates wxGraphicsBitmap from an existing wxImage.
virtual wxImage CreateImageFromBitmap (const wxGraphicsBitmap &bmp)=0
 Creates a wxImage from a wxGraphicsBitmap.
virtual wxGraphicsBitmap CreateBitmapFromNativeBitmap (void *bitmap)=0
 Creates wxGraphicsBitmap from a native bitmap handle.
virtual wxGraphicsContext * CreateContext (const wxEnhMetaFileDC &metaFileDC)=0
 Creates a wxGraphicsContext from a wxEnhMetaFileDC.
wxGraphicsContext * CreateContextFromUnknownDC (wxDC &dc)
 Creates a wxGraphicsContext from a DC of unknown specific type.
wxGraphicsContext * CreateContextFromImage (wxImage &image)
 Creates a wxGraphicsContext associated with a wxImage.
virtual wxGraphicsBrush CreateBrush (const wxBrush &brush)=0
 Creates a native brush from a wxBrush.
virtual wxGraphicsFont CreateFont (const wxFont &font, const wxColour &col= *wxBLACK)=0
 Creates a native graphics font from a wxFont and a text colour.
virtual wxGraphicsFont CreateFont (double sizeInPixels, const wxString &facename, int flags=wxFONTFLAG_DEFAULT, const wxColour &col= *wxBLACK)=0
 Creates a graphics font with the given characteristics.
virtual wxGraphicsFont CreateFontAtDPI (const wxFont &font, const wxRealPoint &dpi, const wxColour &col= *wxBLACK)=0
 Creates a native graphics font from a wxFont and a text colour.
virtual wxGraphicsBrush CreateLinearGradientBrush (wxDouble x1, wxDouble y1, wxDouble x2, wxDouble y2, const wxGraphicsGradientStops &stops, const wxGraphicsMatrix &matrix=wxNullGraphicsMatrix)=0
 Creates a native brush with a linear gradient.
virtual wxGraphicsMatrix CreateMatrix (wxDouble a=1.0, wxDouble b=0.0, wxDouble c=0.0, wxDouble d=1.0, wxDouble tx=0.0, wxDouble ty=0.0)=0
 Creates a native affine transformation matrix from the passed in values.
virtual wxGraphicsPath CreatePath ()=0
 Creates a native graphics path which is initially empty.
virtual wxGraphicsPen CreatePen (const wxGraphicsPenInfo &info)=0
 Creates a native pen from its description.
virtual wxGraphicsBrush CreateRadialGradientBrush (wxDouble startX, wxDouble startY, wxDouble endX, wxDouble endY, wxDouble radius, const wxGraphicsGradientStops &stops, const wxGraphicsMatrix &matrix=wxNullGraphicsMatrix)=0
 Creates a native brush with a radial gradient.
virtual wxGraphicsBitmap CreateSubBitmap (const wxGraphicsBitmap &bitmap, wxDouble x, wxDouble y, wxDouble w, wxDouble h)=0
 Extracts a sub-bitmap from an existing bitmap.
Public Member Functions inherited from wxObject
 wxObject ()
 Default ctor; initializes to nullptr the internal reference data.
 wxObject (const wxObject &other)
 Copy ctor.
virtual ~wxObject ()
 Destructor.
virtual wxClassInfo * GetClassInfo () const
 This virtual function is redefined for every class that requires run-time type information, when using the wxDECLARE_CLASS macro (or similar).
wxObjectRefData * GetRefData () const
 Returns the wxObject::m_refData pointer, i.e. the data referenced by this object.
bool IsKindOf (const wxClassInfo *info) const
 Determines whether this class is a subclass of (or the same class as) the given class.
bool IsSameAs (const wxObject &obj) const
 Returns true if this object has the same data pointer as obj.
void Ref (const wxObject &clone)
 Makes this object refer to the data in clone.
void SetRefData (wxObjectRefData *data)
 Sets the wxObject::m_refData pointer.
void UnRef ()
 Decrements the reference count in the associated data, and if it is zero, deletes the data.
void UnShare ()
 This is the same of AllocExclusive() but this method is public.
void operator delete (void *buf)
 The delete operator is defined for debugging versions of the library only, when the identifier __WXDEBUG__ is defined.
void * operator new (size_t size, const wxString &filename=nullptr, int lineNum=0)
 The new operator is defined for debugging versions of the library only, when the identifier __WXDEBUG__ is defined.

Additional Inherited Members

Static Public Member Functions inherited from wxGraphicsRenderer
static wxGraphicsContext * CreateContextFromNativeHDC (WXHDC dc)
 Creates a wxGraphicsContext from a native DC handle.
static wxGraphicsRenderer * GetDefaultRenderer ()
 Returns the default renderer on this platform.
static wxGraphicsRenderer * GetCairoRenderer ()
 Returns the Cairo renderer.
static wxGraphicsRenderer * GetGDIPlusRenderer ()
 Returns the GDI+ renderer (MSW only).
static wxGraphicsRenderer * GetDirect2DRenderer ()
 Returns the Direct2D renderer (MSW only).
Protected Member Functions inherited from wxObject
void AllocExclusive ()
 Ensure that this object's data is not shared with any other object.
virtual wxObjectRefData * CreateRefData () const
 Creates a new instance of the wxObjectRefData-derived class specific to this object and returns it.
virtual wxObjectRefData * CloneRefData (const wxObjectRefData *data) const
 Creates a new instance of the wxObjectRefData-derived class specific to this object and initializes it copying data.
Protected Attributes inherited from wxObject
wxObjectRefData * m_refData
 Pointer to an object which is the object's reference-counted data.

Member Function Documentation

◆ CreateContext() [1/7]

virtual wxGraphicsContext * wxSVGGraphicsRenderer::CreateContext ( const wxMemoryDC & dc)
overridevirtual

This method is not supported by the SVG renderer and always returns nullptr.

SVG contexts are created automatically when calling wxSVGFileDC::GetGraphicsContext().

Implements wxGraphicsRenderer.

◆ CreateContext() [2/7]

virtual wxGraphicsContext * wxSVGGraphicsRenderer::CreateContext ( const wxPrinterDC & dc)
overridevirtual

This method is not supported by the SVG renderer and always returns nullptr.

SVG contexts are created automatically when calling wxSVGFileDC::GetGraphicsContext().

Implements wxGraphicsRenderer.

◆ CreateContext() [3/7]

wxGraphicsContext * wxSVGGraphicsRenderer::CreateContext ( const wxSize & size,
const wxString & filename = wxString(),
const wxString & title = wxString(),
double dpi = wxSVG_DEFAULT_DPI )

Creates a graphics context that draws into the given file.

Since
3.3.3

◆ CreateContext() [4/7]

wxGraphicsContext * wxSVGGraphicsRenderer::CreateContext ( const wxString & filename,
int width = 320,
int height = 240,
double dpi = wxSVG_DEFAULT_DPI,
const wxString & title = wxString() )

Creates a graphics context that draws into the given file.

Since
3.3.3

◆ CreateContext() [5/7]

virtual wxGraphicsContext * wxSVGGraphicsRenderer::CreateContext ( const wxWindowDC & dc)
overridevirtual

This method is not supported by the SVG renderer and always returns nullptr.

SVG contexts are created automatically when calling wxSVGFileDC::GetGraphicsContext().

Implements wxGraphicsRenderer.

◆ CreateContext() [6/7]

wxGraphicsContext * wxSVGGraphicsRenderer::CreateContext ( wxSVGFileDC & dc)

Creates a graphics context that draws into the given SVG DC.

The DC must outlive the returned context.

Since
3.3.3

◆ CreateContext() [7/7]

virtual wxGraphicsContext * wxSVGGraphicsRenderer::CreateContext ( wxWindow * window)
overridevirtual

This method is not supported by the SVG renderer and always returns nullptr.

Implements wxGraphicsRenderer.

◆ CreateContextFromImage()

virtual wxGraphicsContext * wxSVGGraphicsRenderer::CreateContextFromImage ( wxImage & image)
overridevirtual

This method is not supported by the SVG renderer and always returns nullptr.

◆ CreateContextFromNativeContext()

virtual wxGraphicsContext * wxSVGGraphicsRenderer::CreateContextFromNativeContext ( void * context)
overridevirtual

This method is not supported by the SVG renderer and always returns nullptr.

Implements wxGraphicsRenderer.

◆ CreateContextFromNativeWindow()

virtual wxGraphicsContext * wxSVGGraphicsRenderer::CreateContextFromNativeWindow ( void * window)
overridevirtual

This method is not supported by the SVG renderer and always returns nullptr.

Implements wxGraphicsRenderer.

◆ CreateMeasuringContext()

virtual wxGraphicsContext * wxSVGGraphicsRenderer::CreateMeasuringContext ( )
overridevirtual

This method is not supported by the SVG renderer and always returns nullptr.

Implements wxGraphicsRenderer.

◆ GetName()

virtual wxString wxSVGGraphicsRenderer::GetName ( ) const
overridevirtual

Returns the name of the renderer, which is always "svg".

Implements wxGraphicsRenderer.

◆ GetVersion()

virtual void wxSVGGraphicsRenderer::GetVersion ( int * major,
int * minor = nullptr,
int * micro = nullptr ) const
overridevirtual

Returns the version of the SVG specification targeted by this renderer (currently 1.0).

Implements wxGraphicsRenderer.