]> git.saurik.com Git - wxWidgets.git/blob - contrib/docs/latex/svg/dcsvg.tex
implemented IsModified() and DiscardEdits()
[wxWidgets.git] / contrib / docs / latex / svg / 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{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{double}{ xc}, \param{double}{ 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::GetOptimization}\label{wxdcgetoptimization}
437
438 \func{bool}{GetOptimization}{\void}
439
440 Always returns TRUE, with an assertion in debug mode that optimisation is not implemented
441
442 \membersection{wxSVGFileDC::GetPen}\label{wxdcgetpen}
443
444 \func{wxPen\&}{GetPen}{\void}
445
446 \constfunc{const wxPen\&}{GetPen}{\void}
447
448 Gets the current pen (see \helpref{wxSVGFileDC::SetPen}{wxdcsetpen}).
449
450 \membersection{wxSVGFileDC::GetPixel}\label{wxdcgetpixel}
451
452 \func{bool}{GetPixel}{\param{wxCoord}{ x}, \param{wxCoord}{ y}, \param{wxColour *}{colour}}
453
454 Not implemented
455
456 \membersection{wxSVGFileDC::GetSize}\label{wxdcgetsize}
457
458 \func{void}{GetSize}{\param{wxCoord *}{width}, \param{wxCoord *}{height}}
459
460
461 For a Windows printer device context, this gets the horizontal and vertical
462 resolution.
463
464 \membersection{wxSVGFileDC::GetTextBackground}\label{wxdcgettextbackground}
465
466 \func{wxColour\&}{GetTextBackground}{\void}
467
468 \constfunc{const wxColour\&}{GetTextBackground}{\void}
469
470 Gets the current text background colour (see \helpref{wxSVGFileDC::SetTextBackground}{wxdcsettextbackground}).
471
472 \membersection{wxSVGFileDC::GetTextExtent}\label{wxdcgettextextent}
473
474 \func{void}{GetTextExtent}{\param{const wxString\& }{string}, \param{wxCoord *}{w}, \param{wxCoord *}{h},\\
475 \param{wxCoord *}{descent = NULL}, \param{wxCoord *}{externalLeading = NULL}, \param{wxFont *}{font = NULL}}
476
477 Gets the dimensions of the string using the currently selected font.
478 \rtfsp{\it string} is the text string to measure, {\it w} and {\it h} are
479 the total width and height respectively, {\it descent} is the
480 dimension from the baseline of the font to the bottom of the
481 descender, and {\it externalLeading} is any extra vertical space added
482 to the font by the font designer (usually is zero).
483
484 The optional parameter {\it font} specifies an alternative
485 to the currently selected font: but note that this does not
486 yet work under Windows, so you need to set a font for
487 the device context first.
488
489 See also \helpref{wxFont}{wxfont}, \helpref{wxSVGFileDC::SetFont}{wxdcsetfont}.
490
491 \membersection{wxSVGFileDC::GetTextForeground}\label{wxdcgettextforeground}
492
493 \func{wxColour\&}{GetTextForeground}{\void}
494
495 \constfunc{const wxColour\&}{GetTextForeground}{\void}
496
497 Gets the current text foreground colour (see \helpref{wxSVGFileDC::SetTextForeground}{wxdcsettextforeground}).
498
499
500 \membersection{wxSVGFileDC::GetUserScale}\label{wxdcgetuserscale}
501
502 \func{void}{GetUserScale}{\param{double}{ *x}, \param{double}{ *y}}
503
504 Gets the current user scale factor (set by \helpref{SetUserScale}{wxdcsetuserscale}).
505
506 \membersection{wxSVGFileDC::LogicalToDeviceX}\label{wxdclogicaltodevicex}
507
508 \func{wxCoord}{LogicalToDeviceX}{\param{wxCoord}{ x}}
509
510 Converts logical X coordinate to device coordinate, using the current
511 mapping mode.
512
513 \membersection{wxSVGFileDC::LogicalToDeviceXRel}\label{wxdclogicaltodevicexrel}
514
515 \func{wxCoord}{LogicalToDeviceXRel}{\param{wxCoord}{ x}}
516
517 Converts logical X coordinate to relative device coordinate, using the current
518 mapping mode but ignoring the x axis orientation.
519 Use this for converting a width, for example.
520
521 \membersection{wxSVGFileDC::LogicalToDeviceY}\label{wxdclogicaltodevicey}
522
523 \func{wxCoord}{LogicalToDeviceY}{\param{wxCoord}{ y}}
524
525 Converts logical Y coordinate to device coordinate, using the current
526 mapping mode.
527
528 \membersection{wxSVGFileDC::LogicalToDeviceYRel}\label{wxdclogicaltodeviceyrel}
529
530 \func{wxCoord}{LogicalToDeviceYRel}{\param{wxCoord}{ y}}
531
532 Converts logical Y coordinate to relative device coordinate, using the current
533 mapping mode but ignoring the y axis orientation.
534 Use this for converting a height, for example.
535
536 \membersection{wxSVGFileDC::MaxX}\label{wxdcmaxx}
537
538 \func{wxCoord}{MaxX}{\void}
539
540 Gets the maximum horizontal extent used in drawing commands so far.
541
542 \membersection{wxSVGFileDC::MaxY}\label{wxdcmaxy}
543
544 \func{wxCoord}{MaxY}{\void}
545
546 Gets the maximum vertical extent used in drawing commands so far.
547
548 \membersection{wxSVGFileDC::MinX}\label{wxdcminx}
549
550 \func{wxCoord}{MinX}{\void}
551
552 Gets the minimum horizontal extent used in drawing commands so far.
553
554 \membersection{wxSVGFileDC::MinY}\label{wxdcminy}
555
556 \func{wxCoord}{MinY}{\void}
557
558 Gets the minimum vertical extent used in drawing commands so far.
559
560 \membersection{wxSVGFileDC::Ok}\label{wxdcok}
561
562 \func{bool}{Ok}{\void}
563
564 Returns TRUE if the DC is ok to use; False values arise from being unable to
565 write the file
566
567 \membersection{wxSVGFileDC::ResetBoundingBox}\label{wxdcresetboundingbox}
568
569 \func{void}{ResetBoundingBox}{\void}
570
571 Resets the bounding box: after a call to this function, the bounding box
572 doesn't contain anything.
573
574 \wxheading{See also}
575
576 \helpref{CalcBoundingBox}{wxdccalcboundingbox}
577
578 \membersection{wxSVGFileDC::SetAxisOrientation}\label{wxdcsetaxisorientation}
579
580 \func{void}{SetAxisOrientation}{\param{bool}{ xLeftRight},
581 \param{bool}{ yBottomUp}}
582
583 Sets the x and y axis orientation (i.e., the direction from lowest to
584 highest values on the axis). The default orientation is the natural
585 orientation, e.g. x axis from left to right and y axis from bottom up.
586
587 \wxheading{Parameters}
588
589 \docparam{xLeftRight}{True to set the x axis orientation to the natural
590 left to right orientation, false to invert it.}
591
592 \docparam{yBottomUp}{True to set the y axis orientation to the natural
593 bottom up orientation, false to invert it.}
594
595 \membersection{wxSVGFileDC::SetDeviceOrigin}\label{wxdcsetdeviceorigin}
596
597 \func{void}{SetDeviceOrigin}{\param{wxCoord}{ x}, \param{wxCoord}{ y}}
598
599 Sets the device origin (i.e., the origin in pixels after scaling has been
600 applied).
601
602 This function may be useful in Windows printing
603 operations for placing a graphic on a page.
604
605 \membersection{wxSVGFileDC::SetBackground}\label{wxdcsetbackground}
606
607 \func{void}{SetBackground}{\param{const wxBrush\& }{brush}}
608
609 Sets the current background brush for the DC.
610
611 \membersection{wxSVGFileDC::SetBackgroundMode}\label{wxdcsetbackgroundmode}
612
613 \func{void}{SetBackgroundMode}{\param{int}{ mode}}
614
615 {\it mode} may be one of wxSOLID and wxTRANSPARENT. This setting determines
616 whether text will be drawn with a background colour or not.
617
618 \membersection{wxSVGFileDC::SetClippingRegion}\label{wxdcsetclippingregion}
619
620 \func{void}{SetClippingRegion}{\param{wxCoord}{ x}, \param{wxCoord}{ y}, \param{wxCoord}{ width}, \param{wxCoord}{ height}}
621
622 \func{void}{SetClippingRegion}{\param{const wxPoint\& }{pt}, \param{const wxSize\& }{sz}}
623
624 \func{void}{SetClippingRegion}{\param{const wxRect\&}{ rect}}
625
626 \func{void}{SetClippingRegion}{\param{const wxRegion\&}{ region}}
627
628 Not implemented
629
630
631 \membersection{wxSVGFileDC::SetPalette}\label{wxdcsetpalette}
632
633 \func{void}{SetPalette}{\param{const wxPalette\& }{palette}}
634
635 Not implemented
636
637 \membersection{wxSVGFileDC::SetBrush}\label{wxdcsetbrush}
638
639 \func{void}{SetBrush}{\param{const wxBrush\& }{brush}}
640
641 Sets the current brush for the DC.
642
643 If the argument is wxNullBrush, the current brush is selected out of the device
644 context, and the original brush restored, allowing the current brush to
645 be destroyed safely.
646
647 See also \helpref{wxBrush}{wxbrush}.
648
649 See also \helpref{wxMemoryDC}{wxmemorydc} for the interpretation of colours
650 when drawing into a monochrome bitmap.
651
652 \membersection{wxSVGFileDC::SetFont}\label{wxdcsetfont}
653
654 \func{void}{SetFont}{\param{const wxFont\& }{font}}
655
656 Sets the current font for the DC. It must be a valid font, in particular you
657 should not pass {\tt wxNullFont} to this method.
658
659 See also \helpref{wxFont}{wxfont}.
660
661 \membersection{wxSVGFileDC::SetLogicalFunction}\label{wxdcsetlogicalfunction}
662
663 \func{void}{SetLogicalFunction}{\param{int}{ function}}
664
665
666 Only wxCOPY is avalaible; trying to set one of the othe values will fail
667
668 \membersection{wxSVGFileDC::SetMapMode}\label{wxdcsetmapmode}
669
670 \func{void}{SetMapMode}{\param{int}{ int}}
671
672 The {\it mapping mode} of the device context defines the unit of
673 measurement used to convert logical units to device units. Note that
674 in X, text drawing isn't handled consistently with the mapping mode; a
675 font is always specified in point size. However, setting the {\it
676 user scale} (see \helpref{wxSVGFileDC::SetUserScale}{wxdcsetuserscale}) scales the text appropriately. In
677 Windows, scaleable TrueType fonts are always used; in X, results depend
678 on availability of fonts, but usually a reasonable match is found.
679
680 Note that the coordinate origin should ideally be selectable, but for
681 now is always at the top left of the screen/printer.
682
683 Drawing to a Windows printer device context under UNIX
684 uses the current mapping mode, but mapping mode is currently ignored for
685 PostScript output.
686
687 The mapping mode can be one of the following:
688
689 \begin{twocollist}\itemsep=0pt
690 \twocolitem{wxMM\_TWIPS}{Each logical unit is 1/20 of a point, or 1/1440 of
691 an inch.}
692 \twocolitem{wxMM\_POINTS}{Each logical unit is a point, or 1/72 of an inch.}
693 \twocolitem{wxMM\_METRIC}{Each logical unit is 1 mm.}
694 \twocolitem{wxMM\_LOMETRIC}{Each logical unit is 1/10 of a mm.}
695 \twocolitem{wxMM\_TEXT}{Each logical unit is 1 pixel.}
696 \end{twocollist}
697
698 \membersection{wxSVGFileDC::SetOptimization}\label{wxsetoptimization}
699
700 \func{void}{SetOptimization}{\param{bool }{optimize}}
701
702 Does nothing
703
704 \membersection{wxSVGFileDC::SetPen}\label{wxdcsetpen}
705
706 \func{void}{SetPen}{\param{const wxPen\& }{pen}}
707
708 Sets the current pen for the DC.
709
710 If the argument is wxNullPen, the current pen is selected out of the device
711 context, and the original pen restored.
712
713 See also \helpref{wxMemoryDC}{wxmemorydc} for the interpretation of colours
714 when drawing into a monochrome bitmap.
715
716 \membersection{wxSVGFileDC::SetTextBackground}\label{wxdcsettextbackground}
717
718 \func{void}{SetTextBackground}{\param{const wxColour\& }{colour}}
719
720 Sets the current text background colour for the DC.
721
722 \membersection{wxSVGFileDC::SetTextForeground}\label{wxdcsettextforeground}
723
724 \func{void}{SetTextForeground}{\param{const wxColour\& }{colour}}
725
726 Sets the current text foreground colour for the DC.
727
728 See also \helpref{wxMemoryDC}{wxmemorydc} for the interpretation of colours
729 when drawing into a monochrome bitmap.
730
731 \membersection{wxSVGFileDC::SetUserScale}\label{wxdcsetuserscale}
732
733 \func{void}{SetUserScale}{\param{double}{ xScale}, \param{double}{ yScale}}
734
735 Sets the user scaling factor, useful for applications which require
736 `zooming'.
737
738 \membersection{wxSVGFileDC::StartDoc}\label{wxdcstartdoc}
739
740 \func{bool}{StartDoc}{\param{const wxString\& }{message}}
741
742 Does nothing
743
744 \membersection{wxSVGFileDC::StartPage}\label{wxdcstartpage}
745
746 \func{bool}{StartPage}{\void}
747
748 Does nothing