]> git.saurik.com Git - wxWidgets.git/blob - docs/latex/wx/graphicsrenderer.tex
Correct wxObjectDataPtr<> assignment from *T to not increase the ref count
[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{Library}
25
26 \helpref{wxCore}{librarieslist}
27
28 \wxheading{Data structures}
29
30 \latexignore{\rtfignore{\wxheading{Members}}}
31
32 \membersection{wxGraphicsRenderer::GetDefaultRenderer}\label{wxgraphicsrenderergetdefaultrenderer}
33
34 \func{wxGraphicsRenderer*}{GetDefaultRenderer}{\void}
35
36 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.
37
38 \membersection{wxGraphicsRenderer::CreateContext}\label{wxgraphicsrenderercreatecontext}
39
40 \func{wxGraphicsContext *}{CreateContext}{\param{const wxWindowDC\& }{dc}}
41
42 Creates a wxGraphicsContext from a wxWindowDC (eg a wxPaintDC).
43
44 \func{wxGraphicsContext *}{CreateContext}{\param{wxWindow* }{window}}
45
46 Creates a wxGraphicsContext from a wxWindow.
47
48 \membersection{wxGraphicsRenderer::CreateContextFromNativeContext}\label{wxgraphicsrenderercreatecontextfromnativecontext}
49
50 \func{wxGraphicsContext *}{CreateContextFromNativeContext}{\param{void * }{context}}
51
52 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.
53
54 \membersection{wxGraphicsRenderer::CreateContextFromNativeWindow}\label{wxgraphicsrenderercreatecontextfromnativewindow}
55
56 \func{wxGraphicsContext *}{CreateContextFromNativeWindow}{\param{void * }{window}}
57
58 Creates a wxGraphicsContext from a native window.
59
60 \membersection{wxGraphicsRenderer::CreatePen}\label{wxgraphicsrenderercreatepen}
61
62 \func{wxGraphicsPen}{CreatePen}{\param{const wxPen\& }{pen}}
63
64 Creates a native pen from a wxPen.
65
66 \membersection{wxGraphicsRenderer::CreateBrush}\label{wxgraphicsrenderercreatebrush}
67
68 \func{wxGraphicsBrush}{CreateBrush}{\param{const wxBrush\& }{brush}}
69
70 Creates a native brush from a wxBrush.
71
72 \membersection{wxGraphicsRenderer::CreateLinearGradientBrush}\label{wxgraphicsrenderercreatelineargradientbrush}
73
74 \func{wxGraphicsBrush}{CreateLinearGradientBrush}{\param{wxDouble }{x1}, \param{wxDouble }{y1}, \param{wxDouble }{x2}, \param{wxDouble }{y2}, \param{const }{wxColour\&c1}, \param{const }{wxColour\&c2}}
75
76 Creates a native brush, having a linear gradient, starting at (x1,y1) with color c1 to (x2,y2) with color c2
77
78 \membersection{wxGraphicsRenderer::CreateRadialGradientBrush}\label{wxgraphicsrenderercreateradialgradientbrush}
79
80 \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}}
81
82 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
83
84 \membersection{wxGraphicsRenderer::CreateFont}\label{wxgraphicsrenderercreatefont}
85
86 \func{wxGraphicsFont}{CreateFont}{\param{const wxFont\& }{font}, \param{const wxColour\& }{col = *wxBLACK}}
87
88 Creates a native graphics font from a wxFont and a text colour.
89
90 \membersection{wxGraphicsRenderer::CreateMatrix}\label{wxgraphicsrenderercreatematrix}
91
92 \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}}
93
94 Creates a native affine transformation matrix from the passed in values. The defaults result in an identity matrix.
95
96 \membersection{wxGraphicsRenderer::CreatePath}\label{wxgraphicsrenderercreatepath}
97
98 \func{wxGraphicsPath}{CreatePath}{\void}
99
100 Creates a native graphics path which is initially empty.
101
102