wx.GraphicsRenderer

Inheritance diagram for wx.GraphicsRenderer:



Description

A wx.GraphicsRenderer is the instance corresponding to the rendering engine used. There may be multiple instances on a system, if there are different rendering engines present, but there is always one instance per engine, eg there is ONE core graphics renderer instance on OSX. This instance is pointed back to by all objects created by it (wx.GraphicsContext, wx.GraphicsPath etc...).

Therefore you can create ag additional instances of paths etc. by calling GetRenderer() and then using the appropriate CreateXXX function.

Derived From

Class API

Methods

__init__()
No docstrings available for this method.

CreateBrush(brush)

Creates a native brush from a wx.Brush.

Parameters:


Returns:

wx.GraphicsBrush


CreateContext(dc)

Creates a wx.GraphicsContext from a wx.Window.

Parameters:


Returns:

wx.GraphicsContext


CreateContextFromNativeContext(context)

Creates a wx.GraphicsContext from a native context. This native context must be eg a CGContextRef for Core Graphics, a Graphics pointer for GDIPlus or a cairo_t pointer for cairo.

Parameters:

  • context ()

Returns:

wx.GraphicsContext


CreateContextFromNativeWindow(window)

Creates a wx.GraphicsContext from a native window.

Parameters:

  • window ()

Returns:

wx.GraphicsContext


CreateFont(font, col=wx.BLACK)

Creates a native graphics font from a wx.Font and a text colour.

Parameters:


Returns:

wx.GraphicsFont


CreateLinearGradientBrush(x1, y1, x2, y2, c1, c2)

Creates a native brush, having a linear gradient, starting at (x1, y1) with color c1 to (x2, y2) with color c2.

Parameters:


Returns:

wx.GraphicsBrush


CreateMatrix(a=1.0, b=0.0, c=0.0, d=1.0, tx=0.0, ty=0.0)

Creates a native affine transformation matrix from the passed in values. The defaults result in an identity matrix.

Parameters:

  • a (double)
  • b (double)
  • c (double)
  • d (double)
  • tx (double)
  • ty (double)

Returns:

wx.GraphicsMatrix


CreateMeasuringContext()
No docstrings available for this method.

CreatePath()

Creates a native graphics path which is initially empty.


Returns:

wx.GraphicsPath


CreatePen(pen)

Creates a native pen from a wx.Pen.

Parameters:


Returns:

wx.GraphicsPen


CreateRadialGradientBrush(xo, yo, xc, yc, radius, oColor, cColor)

Creates a native brush, having a radial gradient originating at (xo, yo) with color oColour and ends on a circle around (xc, yc) with radius radius and color cColour.

Parameters:

  • xo (double)
  • yo (double)
  • xc (double)
  • yc (double)
  • radius (double)
  • oColor (wx.Colour)
  • cColor (wx.Colour)

Returns:

wx.GraphicsBrush


GetDefaultRenderer()

Returns the default renderer on this platform. On OS X this is the Core Graphics (a.k.a. Quartz 2D) renderer, on MSW the GDIPlus renderer, and on GTK we currently default to the cairo renderer.


Returns:

wx.GraphicsRenderer