1 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2 %% Name: graphicsrenderer.tex
3 %% Purpose: wxGraphicsRenderer class documentation
4 %% Author: Stefan Csomor
8 %% Copyright: (c) Stefan Csomor
9 %% License: wxWindows license
10 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
12 \section{\class{wxGraphicsRenderer
}}\label{wxgraphicsrenderer
}
14 A wxGraphicsRenderer 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 (wxGraphicsContext, wxGraphicsPath etc). Therefore you can create ag additional instances of paths etc. by calling GetRenderer() and then using the appropriate CreateXXX function.
16 \wxheading{Derived from
}
18 \helpref{wxObject
}{wxobject
}
20 \wxheading{Include files
}
24 \wxheading{Data structures
}
26 \latexignore{\rtfignore{\wxheading{Members
}}}
28 \membersection{wxGraphicsRenderer::GetDefaultRenderer
}\label{wxgraphicsrenderergetdefaultrenderer
}
30 \func{wxGraphicsRenderer*
}{GetDefaultRenderer
}{\void}
32 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.
34 \membersection{wxGraphicsRenderer::CreateContext
}\label{wxgraphicsrenderercreatecontext
}
36 \func{wxGraphicsContext *
}{CreateContext
}{\param{const wxWindowDC\&
}{dc
}}
38 Creates a wxGraphicsContext from a wxWindowDC (eg a wxPaintDC).
40 \func{wxGraphicsContext *
}{CreateContext
}{\param{wxWindow*
}{window
}}
42 Creates a wxGraphicsContext from a wxWindow.
44 \membersection{wxGraphicsRenderer::CreateContextFromNativeContext
}\label{wxgraphicsrenderercreatecontextfromnativecontext
}
46 \func{wxGraphicsContext *
}{CreateContextFromNativeContext
}{\param{void *
}{context
}}
48 Creates a wxGraphicsContext 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.
50 \membersection{wxGraphicsRenderer::CreateContextFromNativeWindow
}\label{wxgraphicsrenderercreatecontextfromnativewindow
}
52 \func{wxGraphicsContext *
}{CreateContextFromNativeWindow
}{\param{void *
}{window
}}
54 Creates a wxGraphicsContext from a native window.
56 \membersection{wxGraphicsRenderer::CreatePen
}\label{wxgraphicsrenderercreatepen
}
58 \func{wxGraphicsPen
}{CreatePen
}{\param{const wxPen\&
}{pen
}}
60 Creates a native pen from a wxPen.
62 \membersection{wxGraphicsRenderer::CreateBrush
}\label{wxgraphicsrenderercreatebrush
}
64 \func{wxGraphicsBrush
}{CreateBrush
}{\param{const wxBrush\&
}{brush
}}
66 Creates a native brush from a wxBrush.
68 \membersection{wxGraphicsRenderer::CreateLinearGradientBrush
}\label{wxgraphicsrenderercreatelineargradientbrush
}
70 \func{wxGraphicsBrush
}{CreateLinearGradientBrush
}{\param{wxDouble
}{x1
},
\param{wxDouble
}{y1
},
\param{wxDouble
}{x2
},
\param{wxDouble
}{y2
},
\param{const
}{wxColour\&c1
},
\param{const
}{wxColour\&c2
}}
72 Creates a native brush, having a linear gradient, starting at (x1,y1) with
color c1 to (x2,y2) with
color c2
74 \membersection{wxGraphicsRenderer::CreateRadialGradientBrush
}\label{wxgraphicsrenderercreateradialgradientbrush
}
76 \func{wxGraphicsBrush
}{CreateRadialGradientBrush
}{\param{wxDouble
}{xo
},
\param{wxDouble
}{yo
},
\param{wxDouble
}{xc
},
\param{wxDouble
}{yc
},
\param{wxDouble
}{radius
},
\param{const wxColour\&
}{oColour
},
\param{const wxColour\&
}{cColour
}}
78 Creates a native brush, having a radial gradient originating at (xo,yc) with
color oColour and ends on a circle around (xc,yc) with radius r and
color cColour
80 \membersection{wxGraphicsRenderer::CreateFont
}\label{wxgraphicsrenderercreatefont
}
82 \func{wxGraphicsFont
}{CreateFont
}{\param{const wxFont\&
}{font
},
\param{const wxColour\&
}{col = *wxBLACK
}}
84 Creates a native graphics font from a wxFont and a text colour.
86 \membersection{wxGraphicsRenderer::CreateMatrix
}\label{wxgraphicsrenderercreatematrix
}
88 \func{wxGraphicsMatrix
}{CreateMatrix
}{\param{wxDouble
}{a =
1.0},
\param{wxDouble
}{b =
0.0},
\param{wxDouble
}{c =
0.0},
\param{wxDouble
}{d =
1.0},
\param{wxDouble
}{tx =
0.0},
\param{wxDouble
}{ty =
0.0}}
90 Creates a native affine transformation matrix from the passed in values. The defaults result in an identity matrix.
92 \membersection{wxGraphicsRenderer::CreatePath
}\label{wxgraphicsrenderercreatepath
}
94 \func{wxGraphicsPath
}{CreatePath
}{\void}
96 Creates a native graphics path which is initially empty.