]>
Commit | Line | Data |
---|---|---|
1 | \documentstyle[a4,makeidx,verbatim,texhelp,fancyhea,mysober,mytitle]{report}% | |
2 | %\input{psbox.tex} | |
3 | \newcommand{\commandref}[2]{\helpref{{\tt $\backslash$#1}}{#2}}% | |
4 | \newcommand{\commandrefn}[2]{\helprefn{{\tt $\backslash$#1}}{#2}\index{#1}}% | |
5 | \newcommand{\commandpageref}[2]{\latexignore{\helprefn{{\tt $\backslash$#1}}{#2}}\latexonly{{\tt $\backslash$#1} {\it page \pageref{#2}}}\index{#1}}% | |
6 | \newcommand{\indexit}[1]{#1\index{#1}}% | |
7 | \newcommand{\inioption}[1]{{\bf {\tt #1}}\index{#1}}% | |
8 | \parskip=10pt% | |
9 | \parindent=0pt% | |
10 | %\backgroundcolour{255;255;255}\textcolour{0;0;0}% Has an effect in HTML only | |
11 | \winhelpignore{\title{Manual for wxSVGFileDC}% | |
12 | \author{Chris Elliott}% | |
13 | \date{June 2002}% | |
14 | }% | |
15 | \winhelponly{\title{Manual for wxSVGFileDC}% | |
16 | \author{by Chris Elliott}% | |
17 | }% | |
18 | \makeindex% | |
19 | \begin{document}% | |
20 | \maketitle% | |
21 | \pagestyle{fancyplain}% | |
22 | \bibliographystyle{plain}% | |
23 | \pagenumbering{roman}% | |
24 | \setheader{{\it CONTENTS}}{}{}{}{}{{\it CONTENTS}}% | |
25 | \setfooter{\thepage}{}{}{}{}{\thepage}% | |
26 | \tableofcontents% | |
27 | ||
28 | \chapter*{Copyright notice}% | |
29 | \setheader{{\it COPYRIGHT}}{}{}{}{}{{\it COPYRIGHT}}% | |
30 | \setfooter{\thepage}{}{}{}{}{\thepage}% | |
31 | ||
32 | \chapter*{wxSVGFileDC}% | |
33 | \setheader{{\it wxSVGFileDC}}{}{}{}{}{{\it wxSVGFileDC}}% | |
34 | \setfooter{\thepage}{}{}{}{}{\thepage}% | |
35 | \section{\class{wxSVGFileDC}}\label{wxSVGFileDC} | |
36 | ||
37 | A wxSVGFileDC is a {\it device context} onto which graphics and text can be drawn, and the output | |
38 | produced as a vector file, in the SVG format (see http://www.w3.org/TR/2001/REC-SVG-20010904/ ). | |
39 | This format can be read by a range of programs, including a Netscape plugin (Adobe), full details at | |
40 | http://www.w3.org/Graphics/SVG/SVG-Implementations.htm8 Vector formats may often be smaller | |
41 | than raster formats. | |
42 | ||
43 | The intention behind wxSVGFileDC is that it can be used to produce a file corresponding | |
44 | to the screen display context, wxSVGFileDC, by passing the wxSVGFileDC as a parameter instead of a wxSVGFileDC. Thus | |
45 | the wxSVGFileDC is a write-only class. | |
46 | ||
47 | As the wxSVGFileDC is a vector format, raster operations like GetPixel are unlikely to be supported. | |
48 | However, the SVG specification allows for PNG format raster files to be embedded in the SVG, and so | |
49 | bitmaps, icons and blit operations into the wxSVGFileDC are supported. | |
50 | ||
51 | A more substantial SVG library (for reading and writing) is available at | |
52 | http://www.xs4all.nl/~kholwerd/wxstuff/canvas/htmldocbook/aap.html | |
53 | ||
54 | \wxheading{Derived from} | |
55 | ||
56 | \helpref{wxDCBase}{wxDCBase} | |
57 | ||
58 | \wxheading{Include files} | |
59 | ||
60 | <wx/dcsvg.h> | |
61 | ||
62 | \wxheading{See also} | |
63 | ||
64 | %\helpref{Overview}{dcoverview} | |
65 | ||
66 | ||
67 | \latexignore{\rtfignore{\wxheading{Members}}} | |
68 | ||
69 | \membersection{wxSVGFileDC::wxSVGFileDC} | |
70 | ||
71 | \func{}{wxSVGFileDC}{\param{wxString}{ f}} \rtfsp | |
72 | \func{}{wxSVGFileDC}{\param{wxString}{ f}, \param{int}{ Width},\param{int}{ Height}} \rtfsp | |
73 | \func{}{wxSVGFileDC}{\param{wxString}{ f}, \param{int}{ Width},\param{int}{ Height},\param{float}{ dpi}} \rtfsp | |
74 | ||
75 | Constructors: | |
76 | a filename {\it f} with default size 340x240 at 72.0 dots per inch (a frequent screen resolution). | |
77 | a filename {\it f} with size {\it Width} by {\it Height} at 72.0 dots per inch | |
78 | a filename {\it f} with size {\it Width} by {\it Height} at {\it dpi} resolution. | |
79 | ||
80 | \membersection{wxSVGFileDC::\destruct{wxSVGFileDC}} | |
81 | ||
82 | \func{}{\destruct{wxSVGFileDC}}{\void} | |
83 | ||
84 | Destructor. | |
85 | ||
86 | \membersection{wxSVGFileDC::BeginDrawing}\label{wxdcbegindrawing} | |
87 | ||
88 | Does nothing | |
89 | ||
90 | \membersection{wxSVGFileDC::Blit}\label{wxdcblit} | |
91 | ||
92 | \func{bool}{Blit}{\param{wxCoord}{ xdest}, \param{wxCoord}{ ydest}, \param{wxCoord}{ width}, \param{wxCoord}{ height}, | |
93 | \param{wxSVGFileDC* }{source}, \param{wxCoord}{ xsrc}, \param{wxCoord}{ ysrc}, \param{int}{ logicalFunc = wxCOPY}, | |
94 | \param{bool }{useMask = FALSE}, \param{wxCoord}{ xsrcMask = -1}, \param{wxCoord}{ ysrcMask = -1}} | |
95 | ||
96 | As wxDC: Copy from a source DC to this DC, specifying the destination | |
97 | coordinates, size of area to copy, source DC, source coordinates, | |
98 | logical function, whether to use a bitmap mask, and mask source position. | |
99 | ||
100 | \membersection{wxSVGFileDC::CalcBoundingBox}\label{wxdccalcboundingbox} | |
101 | ||
102 | \func{void}{CalcBoundingBox}{\param{wxCoord }{x}, \param{wxCoord }{y}} | |
103 | ||
104 | Adds the specified point to the bounding box which can be retrieved with | |
105 | \helpref{MinX}{wxdcminx}, \helpref{MaxX}{wxdcmaxx} and | |
106 | \helpref{MinY}{wxdcminy}, \helpref{MaxY}{wxdcmaxy} functions. | |
107 | ||
108 | ||
109 | \membersection{wxSVGFileDC::Clear}\label{wxdcclear} | |
110 | ||
111 | \func{void}{Clear}{\void} | |
112 | ||
113 | This makes no sense in wxSVGFileDC and does nothing | |
114 | ||
115 | ||
116 | \membersection{wxSVGFileDC::CrossHair}\label{wxdccrosshair} | |
117 | ||
118 | \func{void}{CrossHair}{\param{wxCoord}{ x}, \param{wxCoord}{ y}} | |
119 | ||
120 | Not Implemented | |
121 | ||
122 | \membersection{wxSVGFileDC::DestroyClippingRegion}\label{wxdcdestroyclippingregion} | |
123 | ||
124 | \func{void}{DestroyClippingRegion}{\void} | |
125 | ||
126 | Not Implemented | |
127 | ||
128 | \membersection{wxSVGFileDC::DeviceToLogicalX}\label{wxdcdevicetologicalx} | |
129 | ||
130 | \func{wxCoord}{DeviceToLogicalX}{\param{wxCoord}{ x}} | |
131 | ||
132 | Convert device X coordinate to logical coordinate, using the current | |
133 | mapping mode. | |
134 | ||
135 | \membersection{wxSVGFileDC::DeviceToLogicalXRel}\label{wxdcdevicetologicalxrel} | |
136 | ||
137 | \func{wxCoord}{DeviceToLogicalXRel}{\param{wxCoord}{ x}} | |
138 | ||
139 | Convert device X coordinate to relative logical coordinate, using the current | |
140 | mapping mode but ignoring the x axis orientation. | |
141 | Use this function for converting a width, for example. | |
142 | ||
143 | \membersection{wxSVGFileDC::DeviceToLogicalY}\label{wxdcdevicetologicaly} | |
144 | ||
145 | \func{wxCoord}{DeviceToLogicalY}{\param{wxCoord}{ y}} | |
146 | ||
147 | Converts device Y coordinate to logical coordinate, using the current | |
148 | mapping mode. | |
149 | ||
150 | \membersection{wxSVGFileDC::DeviceToLogicalYRel}\label{wxdcdevicetologicalyrel} | |
151 | ||
152 | \func{wxCoord}{DeviceToLogicalYRel}{\param{wxCoord}{ y}} | |
153 | ||
154 | Convert device Y coordinate to relative logical coordinate, using the current | |
155 | mapping mode but ignoring the y axis orientation. | |
156 | Use this function for converting a height, for example. | |
157 | ||
158 | \membersection{wxSVGFileDC::DrawArc}\label{wxdcdrawarc} | |
159 | ||
160 | \func{void}{DrawArc}{\param{wxCoord}{ x1}, \param{wxCoord}{ y1}, \param{wxCoord}{ x2}, \param{wxCoord}{ y2}, \param{wxCoord}{ xc}, \param{wxCoord}{ yc}} | |
161 | ||
162 | Draws an arc of a circle, centred on ({\it xc, yc}), with starting point ({\it x1, y1}) | |
163 | and ending at ({\it x2, y2}). The current pen is used for the outline | |
164 | and the current brush for filling the shape. | |
165 | ||
166 | The arc is drawn in an anticlockwise direction from the start point to the end point. | |
167 | ||
168 | \membersection{wxSVGFileDC::DrawBitmap}\label{wxdcdrawbitmap} | |
169 | ||
170 | \func{void}{DrawBitmap}{\param{const wxBitmap\&}{ bitmap}, \param{wxCoord}{ x}, \param{wxCoord}{ y}, \param{bool}{ transparent}} | |
171 | ||
172 | Draw a bitmap on the device context at the specified point. If {\it transparent} is true and the bitmap has | |
173 | a transparency mask, the bitmap will be drawn transparently. | |
174 | ||
175 | When drawing a mono-bitmap, the current text foreground colour will be used to draw the foreground | |
176 | of the bitmap (all bits set to 1), and the current text background colour to draw the background | |
177 | (all bits set to 0). See also \helpref{SetTextForeground}{wxdcsettextforeground}, | |
178 | \helpref{SetTextBackground}{wxdcsettextbackground} and \helpref{wxMemoryDC}{wxmemorydc}. | |
179 | ||
180 | \membersection{wxSVGFileDC::DrawCheckMark}\label{wxdcdrawcheckmark} | |
181 | ||
182 | \func{void}{DrawCheckMark}{\param{wxCoord}{ x}, \param{wxCoord}{ y}, \param{wxCoord}{ width}, \param{wxCoord}{ height}} | |
183 | ||
184 | \func{void}{DrawCheckMark}{\param{const wxRect \&}{rect}} | |
185 | ||
186 | Draws a check mark inside the given rectangle. | |
187 | ||
188 | \membersection{wxSVGFileDC::DrawCircle}\label{wxdcdrawcircle} | |
189 | ||
190 | \func{void}{DrawCircle}{\param{wxCoord}{ x}, \param{wxCoord}{ y}, \param{wxCoord}{ radius}} | |
191 | ||
192 | \func{void}{DrawCircle}{\param{const wxPoint\&}{ pt}, \param{wxCoord}{ radius}} | |
193 | ||
194 | Draws a circle with the given centre and radius. | |
195 | ||
196 | \wxheading{See also} | |
197 | ||
198 | \helpref{DrawEllipse}{wxdcdrawellipse} | |
199 | ||
200 | \membersection{wxSVGFileDC::DrawEllipse}\label{wxdcdrawellipse} | |
201 | ||
202 | \func{void}{DrawEllipse}{\param{wxCoord}{ x}, \param{wxCoord}{ y}, \param{wxCoord}{ width}, \param{wxCoord}{ height}} | |
203 | ||
204 | \func{void}{DrawEllipse}{\param{const wxPoint\&}{ pt}, \param{const wxSize\&}{ size}} | |
205 | ||
206 | \func{void}{DrawEllipse}{\param{const wxRect\&}{ rect}} | |
207 | ||
208 | Draws an ellipse contained in the rectangle specified either with the given top | |
209 | left corner and the given size or directly. The current pen is used for the | |
210 | outline and the current brush for filling the shape. | |
211 | ||
212 | \wxheading{See also} | |
213 | ||
214 | \helpref{DrawCircle}{wxdcdrawcircle} | |
215 | ||
216 | \membersection{wxSVGFileDC::DrawEllipticArc}\label{wxdcdrawellipticarc} | |
217 | ||
218 | \func{void}{DrawEllipticArc}{\param{wxCoord}{ x}, \param{wxCoord}{ y}, \param{wxCoord}{ width}, \param{wxCoord}{ height}, | |
219 | \param{double}{ start}, \param{double}{ end}} | |
220 | ||
221 | Draws an arc of an ellipse. The current pen is used for drawing the arc and | |
222 | the current brush is used for drawing the pie. | |
223 | ||
224 | {\it x} and {\it y} specify the x and y coordinates of the upper-left corner of the rectangle that contains | |
225 | the ellipse. | |
226 | ||
227 | {\it width} and {\it height} specify the width and height of the rectangle that contains | |
228 | the ellipse. | |
229 | ||
230 | {\it start} and {\it end} specify the start and end of the arc relative to the three-o'clock | |
231 | position from the center of the rectangle. Angles are specified | |
232 | in degrees (360 is a complete circle). Positive values mean | |
233 | counter-clockwise motion. If {\it start} is equal to {\it end}, a | |
234 | complete ellipse will be drawn. | |
235 | ||
236 | \membersection{wxSVGFileDC::DrawIcon}\label{wxdcdrawicon} | |
237 | ||
238 | \func{void}{DrawIcon}{\param{const wxIcon\&}{ icon}, \param{wxCoord}{ x}, \param{wxCoord}{ y}} | |
239 | ||
240 | Draw an icon on the display (does nothing if the device context is PostScript). | |
241 | This can be the simplest way of drawing bitmaps on a window. | |
242 | ||
243 | \membersection{wxSVGFileDC::DrawLine}\label{wxdcdrawline} | |
244 | ||
245 | \func{void}{DrawLine}{\param{wxCoord}{ x1}, \param{wxCoord}{ y1}, \param{wxCoord}{ x2}, \param{wxCoord}{ y2}} | |
246 | ||
247 | Draws a line from the first point to the second. The current pen is used | |
248 | for drawing the line. | |
249 | ||
250 | \membersection{wxSVGFileDC::DrawLines}\label{wxdcdrawlines} | |
251 | ||
252 | \func{void}{DrawLines}{\param{int}{ n}, \param{wxPoint}{ points[]}, \param{wxCoord}{ xoffset = 0}, \param{wxCoord}{ yoffset = 0}} | |
253 | ||
254 | \func{void}{DrawLines}{\param{wxList *}{points}, \param{wxCoord}{ xoffset = 0}, \param{wxCoord}{ yoffset = 0}} | |
255 | ||
256 | Draws lines using an array of {\it points} of size {\it n}, or list of | |
257 | pointers to points, adding the optional offset coordinate. The current | |
258 | pen is used for drawing the lines. The programmer is responsible for | |
259 | deleting the list of points. | |
260 | ||
261 | \membersection{wxSVGFileDC::DrawPolygon}\label{wxdcdrawpolygon} | |
262 | ||
263 | \func{void}{DrawPolygon}{\param{int}{ n}, \param{wxPoint}{ points[]}, \param{wxCoord}{ xoffset = 0}, \param{wxCoord}{ yoffset = 0},\\ | |
264 | \param{int }{fill\_style = wxODDEVEN\_RULE}} | |
265 | ||
266 | \func{void}{DrawPolygon}{\param{wxList *}{points}, \param{wxCoord}{ xoffset = 0}, \param{wxCoord}{ yoffset = 0},\\ | |
267 | \param{int }{fill\_style = wxODDEVEN\_RULE}} | |
268 | ||
269 | Draws a filled polygon using an array of {\it points} of size {\it n}, | |
270 | or list of pointers to points, adding the optional offset coordinate. | |
271 | ||
272 | The last argument specifies the fill rule: {\bf wxODDEVEN\_RULE} (the | |
273 | default) or {\bf wxWINDING\_RULE}. | |
274 | ||
275 | The current pen is used for drawing the outline, and the current brush | |
276 | for filling the shape. Using a transparent brush suppresses filling. | |
277 | The programmer is responsible for deleting the list of points. | |
278 | ||
279 | Note that wxWindows automatically closes the first and last points. | |
280 | ||
281 | ||
282 | \membersection{wxSVGFileDC::DrawPoint}\label{wxdcdrawpoint} | |
283 | ||
284 | \func{void}{DrawPoint}{\param{wxCoord}{ x}, \param{wxCoord}{ y}} | |
285 | ||
286 | Draws a point using the current pen. | |
287 | ||
288 | \membersection{wxSVGFileDC::DrawRectangle}\label{wxdcdrawrectangle} | |
289 | ||
290 | \func{void}{DrawRectangle}{\param{wxCoord}{ x}, \param{wxCoord}{ y}, \param{wxCoord}{ width}, \param{wxCoord}{ height}} | |
291 | ||
292 | Draws a rectangle with the given top left corner, and with the given | |
293 | size. The current pen is used for the outline and the current brush | |
294 | for filling the shape. | |
295 | ||
296 | \membersection{wxSVGFileDC::DrawRotatedText}\label{wxdcdrawrotatedtext} | |
297 | ||
298 | \func{void}{DrawRotatedText}{\param{const wxString\& }{text}, \param{wxCoord}{ x}, \param{wxCoord}{ y}, \param{double}{ angle}} | |
299 | ||
300 | Draws the text rotated by {\it angle} degrees. | |
301 | ||
302 | The wxMSW wxDC and wxSVGFileDC rotate the text around slightly different points, depending on the size of the font | |
303 | ||
304 | \membersection{wxSVGFileDC::DrawRoundedRectangle}\label{wxdcdrawroundedrectangle} | |
305 | ||
306 | \func{void}{DrawRoundedRectangle}{\param{wxCoord}{ x}, \param{wxCoord}{ y}, \param{wxCoord}{ width}, \param{wxCoord}{ height}, \param{double}{ radius = 20}} | |
307 | ||
308 | Draws a rectangle with the given top left corner, and with the given | |
309 | size. The corners are quarter-circles using the given radius. The | |
310 | current pen is used for the outline and the current brush for filling | |
311 | the shape. | |
312 | ||
313 | If {\it radius} is positive, the value is assumed to be the | |
314 | radius of the rounded corner. If {\it radius} is negative, | |
315 | the absolute value is assumed to be the {\it proportion} of the smallest | |
316 | dimension of the rectangle. This means that the corner can be | |
317 | a sensible size relative to the size of the rectangle, and also avoids | |
318 | the strange effects X produces when the corners are too big for | |
319 | the rectangle. | |
320 | ||
321 | \membersection{wxSVGFileDC::DrawSpline}\label{wxdcdrawspline} | |
322 | ||
323 | \func{void}{DrawSpline}{\param{wxList *}{points}} | |
324 | ||
325 | Draws a spline between all given control points, using the current | |
326 | pen. Doesn't delete the wxList and contents. The spline is drawn | |
327 | using a series of lines, using an algorithm taken from the X drawing | |
328 | program `XFIG'. | |
329 | ||
330 | \func{void}{DrawSpline}{\param{wxCoord}{ x1}, \param{wxCoord}{ y1}, \param{wxCoord}{ x2}, \param{wxCoord}{ y2}, \param{wxCoord}{ x3}, \param{wxCoord}{ y3}} | |
331 | ||
332 | Draws a three-point spline using the current pen. | |
333 | ||
334 | \membersection{wxSVGFileDC::DrawText}\label{wxdcdrawtext} | |
335 | ||
336 | \func{void}{DrawText}{\param{const wxString\& }{text}, \param{wxCoord}{ x}, \param{wxCoord}{ y}} | |
337 | ||
338 | Draws a text string at the specified point, using the current text font, | |
339 | and the current text foreground and background colours. | |
340 | ||
341 | The coordinates refer to the top-left corner of the rectangle bounding | |
342 | the string. See \helpref{wxSVGFileDC::GetTextExtent}{wxdcgettextextent} for how | |
343 | to get the dimensions of a text string, which can be used to position the | |
344 | text more precisely. | |
345 | ||
346 | ||
347 | ||
348 | \membersection{wxSVGFileDC::EndDoc}\label{wxdcenddoc} | |
349 | ||
350 | \func{void}{EndDoc}{\void} | |
351 | ||
352 | Does nothing | |
353 | ||
354 | \membersection{wxSVGFileDC::EndDrawing}\label{wxdcenddrawing} | |
355 | ||
356 | \func{void}{EndDrawing}{\void} | |
357 | ||
358 | Does nothing | |
359 | ||
360 | \membersection{wxSVGFileDC::EndPage}\label{wxdcendpage} | |
361 | ||
362 | \func{void}{EndPage}{\void} | |
363 | ||
364 | Does nothing | |
365 | ||
366 | \membersection{wxSVGFileDC::FloodFill}\label{wxdcfloodfill} | |
367 | ||
368 | \func{void}{FloodFill}{\param{wxCoord}{ x}, \param{wxCoord}{ y}, \param{const wxColour\&}{ colour}, \param{int}{ style=wxFLOOD\_SURFACE}} | |
369 | ||
370 | Not implemented | |
371 | ||
372 | \membersection{wxSVGFileDC::GetBackground}\label{wxdcgetbackground} | |
373 | ||
374 | \func{wxBrush\&}{GetBackground}{\void} | |
375 | ||
376 | \constfunc{const wxBrush\&}{GetBackground}{\void} | |
377 | ||
378 | Gets the brush used for painting the background (see \helpref{wxSVGFileDC::SetBackground}{wxdcsetbackground}). | |
379 | ||
380 | \membersection{wxSVGFileDC::GetBackgroundMode}\label{wxdcgetbackgroundmode} | |
381 | ||
382 | \constfunc{int}{GetBackgroundMode}{\void} | |
383 | ||
384 | Returns the current background mode: {\tt wxSOLID} or {\tt wxTRANSPARENT}. | |
385 | ||
386 | \wxheading{See also} | |
387 | ||
388 | \helpref{SetBackgroundMode}{wxdcsetbackgroundmode} | |
389 | ||
390 | \membersection{wxSVGFileDC::GetBrush}\label{wxdcgetbrush} | |
391 | ||
392 | \func{wxBrush\&}{GetBrush}{\void} | |
393 | ||
394 | \constfunc{const wxBrush\&}{GetBrush}{\void} | |
395 | ||
396 | Gets the current brush (see \helpref{wxSVGFileDC::SetBrush}{wxdcsetbrush}). | |
397 | ||
398 | \membersection{wxSVGFileDC::GetCharHeight}\label{wxdcgetcharheight} | |
399 | ||
400 | \func{wxCoord}{GetCharHeight}{\void} | |
401 | ||
402 | Gets the character height of the currently set font. | |
403 | ||
404 | \membersection{wxSVGFileDC::GetCharWidth}\label{wxdcgetcharwidth} | |
405 | ||
406 | \func{wxCoord}{GetCharWidth}{\void} | |
407 | ||
408 | Gets the average character width of the currently set font. | |
409 | ||
410 | \membersection{wxSVGFileDC::GetClippingBox}\label{wxdcgetclippingbox} | |
411 | ||
412 | \func{void}{GetClippingBox}{\param{wxCoord}{ *x}, \param{wxCoord}{ *y}, \param{wxCoord}{ *width}, \param{wxCoord}{ *height}} | |
413 | ||
414 | Not implemented | |
415 | ||
416 | \membersection{wxSVGFileDC::GetFont}\label{wxdcgetfont} | |
417 | ||
418 | \func{wxFont\&}{GetFont}{\void} | |
419 | ||
420 | \constfunc{const wxFont\&}{GetFont}{\void} | |
421 | ||
422 | Gets the current font (see \helpref{wxSVGFileDC::SetFont}{wxdcsetfont}). | |
423 | ||
424 | \membersection{wxSVGFileDC::GetLogicalFunction}\label{wxdcgetlogicalfunction} | |
425 | ||
426 | \func{int}{GetLogicalFunction}{\void} | |
427 | ||
428 | Gets the current logical function (see \helpref{wxSVGFileDC::SetLogicalFunction}{wxdcsetlogicalfunction}). | |
429 | ||
430 | \membersection{wxSVGFileDC::GetMapMode}\label{wxdcgetmapmode} | |
431 | ||
432 | \func{int}{GetMapMode}{\void} | |
433 | ||
434 | Gets the {\it mapping mode} for the device context (see \helpref{wxSVGFileDC::SetMapMode}{wxdcsetmapmode}). | |
435 | ||
436 | \membersection{wxSVGFileDC::GetPen}\label{wxdcgetpen} | |
437 | ||
438 | \func{wxPen\&}{GetPen}{\void} | |
439 | ||
440 | \constfunc{const wxPen\&}{GetPen}{\void} | |
441 | ||
442 | Gets the current pen (see \helpref{wxSVGFileDC::SetPen}{wxdcsetpen}). | |
443 | ||
444 | \membersection{wxSVGFileDC::GetPixel}\label{wxdcgetpixel} | |
445 | ||
446 | \func{bool}{GetPixel}{\param{wxCoord}{ x}, \param{wxCoord}{ y}, \param{wxColour *}{colour}} | |
447 | ||
448 | Not implemented | |
449 | ||
450 | \membersection{wxSVGFileDC::GetSize}\label{wxdcgetsize} | |
451 | ||
452 | \func{void}{GetSize}{\param{wxCoord *}{width}, \param{wxCoord *}{height}} | |
453 | ||
454 | ||
455 | For a Windows printer device context, this gets the horizontal and vertical | |
456 | resolution. | |
457 | ||
458 | \membersection{wxSVGFileDC::GetTextBackground}\label{wxdcgettextbackground} | |
459 | ||
460 | \func{wxColour\&}{GetTextBackground}{\void} | |
461 | ||
462 | \constfunc{const wxColour\&}{GetTextBackground}{\void} | |
463 | ||
464 | Gets the current text background colour (see \helpref{wxSVGFileDC::SetTextBackground}{wxdcsettextbackground}). | |
465 | ||
466 | \membersection{wxSVGFileDC::GetTextExtent}\label{wxdcgettextextent} | |
467 | ||
468 | \func{void}{GetTextExtent}{\param{const wxString\& }{string}, \param{wxCoord *}{w}, \param{wxCoord *}{h},\\ | |
469 | \param{wxCoord *}{descent = NULL}, \param{wxCoord *}{externalLeading = NULL}, \param{wxFont *}{font = NULL}} | |
470 | ||
471 | Gets the dimensions of the string using the currently selected font. | |
472 | \rtfsp{\it string} is the text string to measure, {\it w} and {\it h} are | |
473 | the total width and height respectively, {\it descent} is the | |
474 | dimension from the baseline of the font to the bottom of the | |
475 | descender, and {\it externalLeading} is any extra vertical space added | |
476 | to the font by the font designer (usually is zero). | |
477 | ||
478 | The optional parameter {\it font} specifies an alternative | |
479 | to the currently selected font: but note that this does not | |
480 | yet work under Windows, so you need to set a font for | |
481 | the device context first. | |
482 | ||
483 | See also \helpref{wxFont}{wxfont}, \helpref{wxSVGFileDC::SetFont}{wxdcsetfont}. | |
484 | ||
485 | \membersection{wxSVGFileDC::GetTextForeground}\label{wxdcgettextforeground} | |
486 | ||
487 | \func{wxColour\&}{GetTextForeground}{\void} | |
488 | ||
489 | \constfunc{const wxColour\&}{GetTextForeground}{\void} | |
490 | ||
491 | Gets the current text foreground colour (see \helpref{wxSVGFileDC::SetTextForeground}{wxdcsettextforeground}). | |
492 | ||
493 | ||
494 | \membersection{wxSVGFileDC::GetUserScale}\label{wxdcgetuserscale} | |
495 | ||
496 | \func{void}{GetUserScale}{\param{double}{ *x}, \param{double}{ *y}} | |
497 | ||
498 | Gets the current user scale factor (set by \helpref{SetUserScale}{wxdcsetuserscale}). | |
499 | ||
500 | \membersection{wxSVGFileDC::LogicalToDeviceX}\label{wxdclogicaltodevicex} | |
501 | ||
502 | \func{wxCoord}{LogicalToDeviceX}{\param{wxCoord}{ x}} | |
503 | ||
504 | Converts logical X coordinate to device coordinate, using the current | |
505 | mapping mode. | |
506 | ||
507 | \membersection{wxSVGFileDC::LogicalToDeviceXRel}\label{wxdclogicaltodevicexrel} | |
508 | ||
509 | \func{wxCoord}{LogicalToDeviceXRel}{\param{wxCoord}{ x}} | |
510 | ||
511 | Converts logical X coordinate to relative device coordinate, using the current | |
512 | mapping mode but ignoring the x axis orientation. | |
513 | Use this for converting a width, for example. | |
514 | ||
515 | \membersection{wxSVGFileDC::LogicalToDeviceY}\label{wxdclogicaltodevicey} | |
516 | ||
517 | \func{wxCoord}{LogicalToDeviceY}{\param{wxCoord}{ y}} | |
518 | ||
519 | Converts logical Y coordinate to device coordinate, using the current | |
520 | mapping mode. | |
521 | ||
522 | \membersection{wxSVGFileDC::LogicalToDeviceYRel}\label{wxdclogicaltodeviceyrel} | |
523 | ||
524 | \func{wxCoord}{LogicalToDeviceYRel}{\param{wxCoord}{ y}} | |
525 | ||
526 | Converts logical Y coordinate to relative device coordinate, using the current | |
527 | mapping mode but ignoring the y axis orientation. | |
528 | Use this for converting a height, for example. | |
529 | ||
530 | \membersection{wxSVGFileDC::MaxX}\label{wxdcmaxx} | |
531 | ||
532 | \func{wxCoord}{MaxX}{\void} | |
533 | ||
534 | Gets the maximum horizontal extent used in drawing commands so far. | |
535 | ||
536 | \membersection{wxSVGFileDC::MaxY}\label{wxdcmaxy} | |
537 | ||
538 | \func{wxCoord}{MaxY}{\void} | |
539 | ||
540 | Gets the maximum vertical extent used in drawing commands so far. | |
541 | ||
542 | \membersection{wxSVGFileDC::MinX}\label{wxdcminx} | |
543 | ||
544 | \func{wxCoord}{MinX}{\void} | |
545 | ||
546 | Gets the minimum horizontal extent used in drawing commands so far. | |
547 | ||
548 | \membersection{wxSVGFileDC::MinY}\label{wxdcminy} | |
549 | ||
550 | \func{wxCoord}{MinY}{\void} | |
551 | ||
552 | Gets the minimum vertical extent used in drawing commands so far. | |
553 | ||
554 | \membersection{wxSVGFileDC::Ok}\label{wxdcok} | |
555 | ||
556 | \func{bool}{Ok}{\void} | |
557 | ||
558 | Returns true if the DC is ok to use; False values arise from being unable to | |
559 | write the file | |
560 | ||
561 | \membersection{wxSVGFileDC::ResetBoundingBox}\label{wxdcresetboundingbox} | |
562 | ||
563 | \func{void}{ResetBoundingBox}{\void} | |
564 | ||
565 | Resets the bounding box: after a call to this function, the bounding box | |
566 | doesn't contain anything. | |
567 | ||
568 | \wxheading{See also} | |
569 | ||
570 | \helpref{CalcBoundingBox}{wxdccalcboundingbox} | |
571 | ||
572 | \membersection{wxSVGFileDC::SetAxisOrientation}\label{wxdcsetaxisorientation} | |
573 | ||
574 | \func{void}{SetAxisOrientation}{\param{bool}{ xLeftRight}, | |
575 | \param{bool}{ yBottomUp}} | |
576 | ||
577 | Sets the x and y axis orientation (i.e., the direction from lowest to | |
578 | highest values on the axis). The default orientation is the natural | |
579 | orientation, e.g. x axis from left to right and y axis from bottom up. | |
580 | ||
581 | \wxheading{Parameters} | |
582 | ||
583 | \docparam{xLeftRight}{True to set the x axis orientation to the natural | |
584 | left to right orientation, false to invert it.} | |
585 | ||
586 | \docparam{yBottomUp}{True to set the y axis orientation to the natural | |
587 | bottom up orientation, false to invert it.} | |
588 | ||
589 | \membersection{wxSVGFileDC::SetDeviceOrigin}\label{wxdcsetdeviceorigin} | |
590 | ||
591 | \func{void}{SetDeviceOrigin}{\param{wxCoord}{ x}, \param{wxCoord}{ y}} | |
592 | ||
593 | Sets the device origin (i.e., the origin in pixels after scaling has been | |
594 | applied). | |
595 | ||
596 | This function may be useful in Windows printing | |
597 | operations for placing a graphic on a page. | |
598 | ||
599 | \membersection{wxSVGFileDC::SetBackground}\label{wxdcsetbackground} | |
600 | ||
601 | \func{void}{SetBackground}{\param{const wxBrush\& }{brush}} | |
602 | ||
603 | Sets the current background brush for the DC. | |
604 | ||
605 | \membersection{wxSVGFileDC::SetBackgroundMode}\label{wxdcsetbackgroundmode} | |
606 | ||
607 | \func{void}{SetBackgroundMode}{\param{int}{ mode}} | |
608 | ||
609 | {\it mode} may be one of wxSOLID and wxTRANSPARENT. This setting determines | |
610 | whether text will be drawn with a background colour or not. | |
611 | ||
612 | \membersection{wxSVGFileDC::SetClippingRegion}\label{wxdcsetclippingregion} | |
613 | ||
614 | \func{void}{SetClippingRegion}{\param{wxCoord}{ x}, \param{wxCoord}{ y}, \param{wxCoord}{ width}, \param{wxCoord}{ height}} | |
615 | ||
616 | \func{void}{SetClippingRegion}{\param{const wxPoint\& }{pt}, \param{const wxSize\& }{sz}} | |
617 | ||
618 | \func{void}{SetClippingRegion}{\param{const wxRect\&}{ rect}} | |
619 | ||
620 | \func{void}{SetClippingRegion}{\param{const wxRegion\&}{ region}} | |
621 | ||
622 | Not implemented | |
623 | ||
624 | ||
625 | \membersection{wxSVGFileDC::SetPalette}\label{wxdcsetpalette} | |
626 | ||
627 | \func{void}{SetPalette}{\param{const wxPalette\& }{palette}} | |
628 | ||
629 | Not implemented | |
630 | ||
631 | \membersection{wxSVGFileDC::SetBrush}\label{wxdcsetbrush} | |
632 | ||
633 | \func{void}{SetBrush}{\param{const wxBrush\& }{brush}} | |
634 | ||
635 | Sets the current brush for the DC. | |
636 | ||
637 | If the argument is wxNullBrush, the current brush is selected out of the device | |
638 | context, and the original brush restored, allowing the current brush to | |
639 | be destroyed safely. | |
640 | ||
641 | See also \helpref{wxBrush}{wxbrush}. | |
642 | ||
643 | See also \helpref{wxMemoryDC}{wxmemorydc} for the interpretation of colours | |
644 | when drawing into a monochrome bitmap. | |
645 | ||
646 | \membersection{wxSVGFileDC::SetFont}\label{wxdcsetfont} | |
647 | ||
648 | \func{void}{SetFont}{\param{const wxFont\& }{font}} | |
649 | ||
650 | Sets the current font for the DC. It must be a valid font, in particular you | |
651 | should not pass {\tt wxNullFont} to this method. | |
652 | ||
653 | See also \helpref{wxFont}{wxfont}. | |
654 | ||
655 | \membersection{wxSVGFileDC::SetLogicalFunction}\label{wxdcsetlogicalfunction} | |
656 | ||
657 | \func{void}{SetLogicalFunction}{\param{int}{ function}} | |
658 | ||
659 | ||
660 | Only wxCOPY is avalaible; trying to set one of the othe values will fail | |
661 | ||
662 | \membersection{wxSVGFileDC::SetMapMode}\label{wxdcsetmapmode} | |
663 | ||
664 | \func{void}{SetMapMode}{\param{int}{ int}} | |
665 | ||
666 | The {\it mapping mode} of the device context defines the unit of | |
667 | measurement used to convert logical units to device units. Note that | |
668 | in X, text drawing isn't handled consistently with the mapping mode; a | |
669 | font is always specified in point size. However, setting the {\it | |
670 | user scale} (see \helpref{wxSVGFileDC::SetUserScale}{wxdcsetuserscale}) scales the text appropriately. In | |
671 | Windows, scaleable TrueType fonts are always used; in X, results depend | |
672 | on availability of fonts, but usually a reasonable match is found. | |
673 | ||
674 | Note that the coordinate origin should ideally be selectable, but for | |
675 | now is always at the top left of the screen/printer. | |
676 | ||
677 | Drawing to a Windows printer device context under UNIX | |
678 | uses the current mapping mode, but mapping mode is currently ignored for | |
679 | PostScript output. | |
680 | ||
681 | The mapping mode can be one of the following: | |
682 | ||
683 | \begin{twocollist}\itemsep=0pt | |
684 | \twocolitem{wxMM\_TWIPS}{Each logical unit is 1/20 of a point, or 1/1440 of | |
685 | an inch.} | |
686 | \twocolitem{wxMM\_POINTS}{Each logical unit is a point, or 1/72 of an inch.} | |
687 | \twocolitem{wxMM\_METRIC}{Each logical unit is 1 mm.} | |
688 | \twocolitem{wxMM\_LOMETRIC}{Each logical unit is 1/10 of a mm.} | |
689 | \twocolitem{wxMM\_TEXT}{Each logical unit is 1 pixel.} | |
690 | \end{twocollist} | |
691 | ||
692 | \membersection{wxSVGFileDC::SetPen}\label{wxdcsetpen} | |
693 | ||
694 | \func{void}{SetPen}{\param{const wxPen\& }{pen}} | |
695 | ||
696 | Sets the current pen for the DC. | |
697 | ||
698 | If the argument is wxNullPen, the current pen is selected out of the device | |
699 | context, and the original pen restored. | |
700 | ||
701 | See also \helpref{wxMemoryDC}{wxmemorydc} for the interpretation of colours | |
702 | when drawing into a monochrome bitmap. | |
703 | ||
704 | \membersection{wxSVGFileDC::SetTextBackground}\label{wxdcsettextbackground} | |
705 | ||
706 | \func{void}{SetTextBackground}{\param{const wxColour\& }{colour}} | |
707 | ||
708 | Sets the current text background colour for the DC. | |
709 | ||
710 | \membersection{wxSVGFileDC::SetTextForeground}\label{wxdcsettextforeground} | |
711 | ||
712 | \func{void}{SetTextForeground}{\param{const wxColour\& }{colour}} | |
713 | ||
714 | Sets the current text foreground colour for the DC. | |
715 | ||
716 | See also \helpref{wxMemoryDC}{wxmemorydc} for the interpretation of colours | |
717 | when drawing into a monochrome bitmap. | |
718 | ||
719 | \membersection{wxSVGFileDC::SetUserScale}\label{wxdcsetuserscale} | |
720 | ||
721 | \func{void}{SetUserScale}{\param{double}{ xScale}, \param{double}{ yScale}} | |
722 | ||
723 | Sets the user scaling factor, useful for applications which require | |
724 | `zooming'. | |
725 | ||
726 | \membersection{wxSVGFileDC::StartDoc}\label{wxdcstartdoc} | |
727 | ||
728 | \func{bool}{StartDoc}{\param{const wxString\& }{message}} | |
729 | ||
730 | Does nothing | |
731 | ||
732 | \membersection{wxSVGFileDC::StartPage}\label{wxdcstartpage} | |
733 | ||
734 | \func{bool}{StartPage}{\void} | |
735 | ||
736 | Does nothing |