]> git.saurik.com Git - wxWidgets.git/blob - docs/latex/wx/graphicsrenderer.tex
Further wxRTC doc additions
[wxWidgets.git] / docs / latex / wx / graphicsrenderer.tex
1 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2 %% Name: graphicsrenderer.tex
3 %% Purpose: wxGraphicsRenderer class documentation
4 %% Author: Stefan Csomor
5 %% Modified by:
6 %% Created: 08.06.2004
7 %% RCS-ID: $Id$
8 %% Copyright: (c) Stefan Csomor
9 %% License: wxWindows license
10 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
11
12 \section{\class{wxGraphicsRenderer}}\label{wxgraphicsrenderer}
13
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.
15
16 \wxheading{Derived from}
17
18 \helpref{wxObject}{wxobject}
19
20 \wxheading{Include files}
21
22 <wx/graphics.h>
23
24 \wxheading{Data structures}
25
26 \latexignore{\rtfignore{\wxheading{Members}}}
27
28 \membersection{wxGraphicsRenderer::GetDefaultRenderer}\label{wxgraphicsrenderergetdefaultrenderer}
29
30 \func{wxGraphicsRenderer*}{GetDefaultRenderer}{\void}
31
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.
33
34 \membersection{wxGraphicsRenderer::CreateContext}\label{wxgraphicsrenderercreatecontext}
35
36 \func{wxGraphicsContext *}{CreateContext}{\param{const wxWindowDC\& }{dc}}
37
38 Creates a wxGraphicsContext from a wxWindowDC (eg a wxPaintDC).
39
40 \func{wxGraphicsContext *}{CreateContext}{\param{wxWindow* }{window}}
41
42 Creates a wxGraphicsContext from a wxWindow.
43
44 \membersection{wxGraphicsRenderer::CreateContextFromNativeContext}\label{wxgraphicsrenderercreatecontextfromnativecontext}
45
46 \func{wxGraphicsContext *}{CreateContextFromNativeContext}{\param{void * }{context}}
47
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.
49
50 \membersection{wxGraphicsRenderer::CreateContextFromNativeWindow}\label{wxgraphicsrenderercreatecontextfromnativewindow}
51
52 \func{wxGraphicsContext *}{CreateContextFromNativeWindow}{\param{void * }{window}}
53
54 Creates a wxGraphicsContext from a native window.
55
56 \membersection{wxGraphicsRenderer::CreatePen}\label{wxgraphicsrenderercreatepen}
57
58 \func{wxGraphicsPen}{CreatePen}{\param{const wxPen\& }{pen}}
59
60 Creates a native pen from a wxPen.
61
62 \membersection{wxGraphicsRenderer::CreateBrush}\label{wxgraphicsrenderercreatebrush}
63
64 \func{wxGraphicsBrush}{CreateBrush}{\param{const wxBrush\& }{brush}}
65
66 Creates a native brush from a wxBrush.
67
68 \membersection{wxGraphicsRenderer::CreateLinearGradientBrush}\label{wxgraphicsrenderercreatelineargradientbrush}
69
70 \func{wxGraphicsBrush}{CreateLinearGradientBrush}{\param{wxDouble }{x1}, \param{wxDouble }{y1}, \param{wxDouble }{x2}, \param{wxDouble }{y2}, \param{const }{wxColour\&c1}, \param{const }{wxColour\&c2}}
71
72 Creates a native brush, having a linear gradient, starting at (x1,y1) with color c1 to (x2,y2) with color c2
73
74 \membersection{wxGraphicsRenderer::CreateRadialGradientBrush}\label{wxgraphicsrenderercreateradialgradientbrush}
75
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}}
77
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
79
80 \membersection{wxGraphicsRenderer::CreateFont}\label{wxgraphicsrenderercreatefont}
81
82 \func{wxGraphicsFont}{CreateFont}{\param{const wxFont\& }{font}, \param{const wxColour\& }{col = *wxBLACK}}
83
84 Creates a native graphics font from a wxFont and a text colour.
85
86 \membersection{wxGraphicsRenderer::CreateMatrix}\label{wxgraphicsrenderercreatematrix}
87
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}}
89
90 Creates a native affine transformation matrix from the passed in values. The defaults result in an identity matrix.
91
92 \membersection{wxGraphicsRenderer::CreatePath}\label{wxgraphicsrenderercreatepath}
93
94 \func{wxGraphicsPath}{CreatePath}{\void}
95
96 Creates a native graphics path which is initially empty.
97
98