1wxGraphicsRenderer(3) Erlang Module Definition wxGraphicsRenderer(3)
2
3
4
6 wxGraphicsRenderer - Functions for wxGraphicsRenderer class
7
9 A wxGraphicsRenderer is the instance corresponding to the rendering en‐
10 gine used. There may be multiple instances on a system, if there are
11 different rendering engines present, but there is always only one in‐
12 stance per engine. This instance is pointed back to by all objects cre‐
13 ated by it (wxGraphicsContext, wxGraphicsPath etc.) and can be re‐
14 trieved through their wxGraphicsObject:getRenderer/1 method. Therefore
15 you can create an additional instance of a path etc. by calling wx‐
16 GraphicsObject:getRenderer/1 and then using the appropriate CreateXXX()
17 function of that renderer.
18
19 wxWidgets docs: wxGraphicsRenderer
20
22 wxGraphicsRenderer() = wx:wx_object()
23
25 getDefaultRenderer() -> wxGraphicsRenderer()
26
27 Returns the default renderer on this platform.
28
29 On macOS this is the Core Graphics (a.k.a. Quartz 2D) renderer,
30 on MSW the GDIPlus renderer, and on GTK we currently default to
31 the Cairo renderer.
32
33 createContext(This, WindowDC) ->
34 wxGraphicsContext:wxGraphicsContext()
35
36 Types:
37
38 This = wxGraphicsRenderer()
39 WindowDC =
40 wxWindowDC:wxWindowDC() |
41 wxWindow:wxWindow() |
42 wxMemoryDC:wxMemoryDC()
43
44 Creates a wxGraphicsContext from a wxWindowDC.
45
46 createBrush(This, Brush) -> wxGraphicsBrush:wxGraphicsBrush()
47
48 Types:
49
50 This = wxGraphicsRenderer()
51 Brush = wxBrush:wxBrush()
52
53 Creates a native brush from a wxBrush.
54
55 createLinearGradientBrush(This, X1, Y1, X2, Y2, Stops) ->
56 wxGraphicsBrush:wxGraphicsBrush()
57
58 Types:
59
60 This = wxGraphicsRenderer()
61 X1 = Y1 = X2 = Y2 = number()
62 Stops = wxGraphicsGradientStops:wxGraphicsGradientStops()
63
64 Creates a native brush with a linear gradient.
65
66 Stops support is new since wxWidgets 2.9.1, previously only the
67 start and end colours could be specified.
68
69 The ability to apply a transformation matrix to the gradient was
70 added in 3.1.3
71
72 createRadialGradientBrush(This, StartX, StartY, EndX, EndY,
73 Radius, Stops) ->
74 wxGraphicsBrush:wxGraphicsBrush()
75
76 Types:
77
78 This = wxGraphicsRenderer()
79 StartX = StartY = EndX = EndY = Radius = number()
80 Stops = wxGraphicsGradientStops:wxGraphicsGradientStops()
81
82 Creates a native brush with a radial gradient.
83
84 Stops support is new since wxWidgets 2.9.1, previously only the
85 start and end colours could be specified.
86
87 The ability to apply a transformation matrix to the gradient was
88 added in 3.1.3
89
90 createFont(This, Font) -> wxGraphicsFont:wxGraphicsFont()
91
92 Types:
93
94 This = wxGraphicsRenderer()
95 Font = wxFont:wxFont()
96
97 createFont(This, SizeInPixels, Facename) ->
98 wxGraphicsFont:wxGraphicsFont()
99
100 createFont(This, Font, Facename :: [Option]) ->
101 wxGraphicsFont:wxGraphicsFont()
102
103 Types:
104
105 This = wxGraphicsRenderer()
106 Font = wxFont:wxFont()
107 Option = {col, wx:wx_colour()}
108
109 Creates a native graphics font from a wxFont and a text colour.
110
111 createFont(This, SizeInPixels, Facename, Options :: [Option]) ->
112 wxGraphicsFont:wxGraphicsFont()
113
114 Types:
115
116 This = wxGraphicsRenderer()
117 SizeInPixels = number()
118 Facename = unicode:chardata()
119 Option = {flags, integer()} | {col, wx:wx_colour()}
120
121 Creates a graphics font with the given characteristics.
122
123 If possible, the createFont/4 overload taking wxFont should be
124 used instead. The main advantage of this overload is that it can
125 be used without X server connection under Unix when using Cairo.
126
127 Since: 2.9.3
128
129 createMatrix(This) -> wxGraphicsMatrix:wxGraphicsMatrix()
130
131 Types:
132
133 This = wxGraphicsRenderer()
134
135 createMatrix(This, Options :: [Option]) ->
136 wxGraphicsMatrix:wxGraphicsMatrix()
137
138 Types:
139
140 This = wxGraphicsRenderer()
141 Option =
142 {a, number()} |
143 {b, number()} |
144 {c, number()} |
145 {d, number()} |
146 {tx, number()} |
147 {ty, number()}
148
149 Creates a native affine transformation matrix from the passed in
150 values.
151
152 The defaults result in an identity matrix.
153
154 createPath(This) -> wxGraphicsPath:wxGraphicsPath()
155
156 Types:
157
158 This = wxGraphicsRenderer()
159
160 Creates a native graphics path which is initially empty.
161
162
163
164wxWidgets team. wx 2.3.1 wxGraphicsRenderer(3)