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