]> git.saurik.com Git - wxWidgets.git/blame - docs/latex/wx/dcsvg.tex
Added newline for PDF RTF
[wxWidgets.git] / docs / latex / wx / dcsvg.tex
CommitLineData
2e4b4ec5
CE
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}%
164e084a
CE
35\section{\class{wxSVGFileDC}}\label{wxSVGFileDC}
36
37A wxSVGFileDC is a {\it device context} onto which graphics and text can be drawn, and the output
38produced as a vector file, in the SVG format (see http://www.w3.org/TR/2001/REC-SVG-20010904/ ).
39This format can be read by a range of programs, including a Netscape plugin (Adobe), full details at
40http://www.w3.org/Graphics/SVG/SVG-Implementations.htm8 Vector formats may often be smaller
41than raster formats.
42
43The intention behind wxSVGFileDC is that it can be used to produce a file corresponding
44to the screen display context, wxSVGFileDC, by passing the wxSVGFileDC as a parameter instead of a wxSVGFileDC. Thus
45the wxSVGFileDC is a write-only class.
46
47As the wxSVGFileDC is a vector format, raster operations like GetPixel are unlikely to be supported.
48However, the SVG specification allows for PNG format raster files to be embedded in the SVG, and so
49bitmaps, icons and blit operations into the wxSVGFileDC are supported.
50
51A more substantial SVG library (for reading and writing) is available at
52http://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
75Constructors:
76a filename {\it f} with default size 340x240 at 72.0 dots per inch (a frequent screen resolution).
77a filename {\it f} with size {\it Width} by {\it Height} at 72.0 dots per inch
78a 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
84Destructor.
85
86\membersection{wxSVGFileDC::BeginDrawing}\label{wxdcbegindrawing}
87
88Does 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
96As wxDC: Copy from a source DC to this DC, specifying the destination
97coordinates, size of area to copy, source DC, source coordinates,
98logical 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
104Adds 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
113This 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
120Not Implemented
121
122\membersection{wxSVGFileDC::DestroyClippingRegion}\label{wxdcdestroyclippingregion}
123
124\func{void}{DestroyClippingRegion}{\void}
125
126Not Implemented
127
128\membersection{wxSVGFileDC::DeviceToLogicalX}\label{wxdcdevicetologicalx}
129
130\func{wxCoord}{DeviceToLogicalX}{\param{wxCoord}{ x}}
131
132Convert device X coordinate to logical coordinate, using the current
133mapping mode.
134
135\membersection{wxSVGFileDC::DeviceToLogicalXRel}\label{wxdcdevicetologicalxrel}
136
137\func{wxCoord}{DeviceToLogicalXRel}{\param{wxCoord}{ x}}
138
139Convert device X coordinate to relative logical coordinate, using the current
140mapping mode but ignoring the x axis orientation.
141Use this function for converting a width, for example.
142
143\membersection{wxSVGFileDC::DeviceToLogicalY}\label{wxdcdevicetologicaly}
144
145\func{wxCoord}{DeviceToLogicalY}{\param{wxCoord}{ y}}
146
147Converts device Y coordinate to logical coordinate, using the current
148mapping mode.
149
150\membersection{wxSVGFileDC::DeviceToLogicalYRel}\label{wxdcdevicetologicalyrel}
151
152\func{wxCoord}{DeviceToLogicalYRel}{\param{wxCoord}{ y}}
153
154Convert device Y coordinate to relative logical coordinate, using the current
155mapping mode but ignoring the y axis orientation.
156Use this function for converting a height, for example.
157
158\membersection{wxSVGFileDC::DrawArc}\label{wxdcdrawarc}
159
8bdd5efa 160\func{void}{DrawArc}{\param{wxCoord}{ x1}, \param{wxCoord}{ y1}, \param{wxCoord}{ x2}, \param{wxCoord}{ y2}, \param{wxCoord}{ xc}, \param{wxCoord}{ yc}}
164e084a
CE
161
162Draws an arc of a circle, centred on ({\it xc, yc}), with starting point ({\it x1, y1})
163and ending at ({\it x2, y2}). The current pen is used for the outline
164and the current brush for filling the shape.
165
166The 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
ea76a6a5 172Draw a bitmap on the device context at the specified point. If {\it transparent} is true and the bitmap has
164e084a
CE
173a transparency mask, the bitmap will be drawn transparently.
174
175When drawing a mono-bitmap, the current text foreground colour will be used to draw the foreground
176of 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
186Draws 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
194Draws 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
208Draws an ellipse contained in the rectangle specified either with the given top
209left corner and the given size or directly. The current pen is used for the
210outline 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
221Draws an arc of an ellipse. The current pen is used for drawing the arc and
222the 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
225the ellipse.
226
227{\it width} and {\it height} specify the width and height of the rectangle that contains
228the ellipse.
229
230{\it start} and {\it end} specify the start and end of the arc relative to the three-o'clock
231position from the center of the rectangle. Angles are specified
232in degrees (360 is a complete circle). Positive values mean
233counter-clockwise motion. If {\it start} is equal to {\it end}, a
234complete 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
240Draw an icon on the display (does nothing if the device context is PostScript).
241This 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
247Draws a line from the first point to the second. The current pen is used
248for 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
256Draws lines using an array of {\it points} of size {\it n}, or list of
257pointers to points, adding the optional offset coordinate. The current
258pen is used for drawing the lines. The programmer is responsible for
259deleting 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
269Draws a filled polygon using an array of {\it points} of size {\it n},
270or list of pointers to points, adding the optional offset coordinate.
271
272The last argument specifies the fill rule: {\bf wxODDEVEN\_RULE} (the
273default) or {\bf wxWINDING\_RULE}.
274
275The current pen is used for drawing the outline, and the current brush
276for filling the shape. Using a transparent brush suppresses filling.
277The programmer is responsible for deleting the list of points.
278
279Note 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
286Draws 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
292Draws a rectangle with the given top left corner, and with the given
293size. The current pen is used for the outline and the current brush
294for 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
300Draws the text rotated by {\it angle} degrees.
301
302The 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
308Draws a rectangle with the given top left corner, and with the given
309size. The corners are quarter-circles using the given radius. The
310current pen is used for the outline and the current brush for filling
311the shape.
312
313If {\it radius} is positive, the value is assumed to be the
314radius of the rounded corner. If {\it radius} is negative,
315the absolute value is assumed to be the {\it proportion} of the smallest
316dimension of the rectangle. This means that the corner can be
317a sensible size relative to the size of the rectangle, and also avoids
318the strange effects X produces when the corners are too big for
319the rectangle.
320
321\membersection{wxSVGFileDC::DrawSpline}\label{wxdcdrawspline}
322
323\func{void}{DrawSpline}{\param{wxList *}{points}}
324
325Draws a spline between all given control points, using the current
326pen. Doesn't delete the wxList and contents. The spline is drawn
327using a series of lines, using an algorithm taken from the X drawing
328program `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
332Draws 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
338Draws a text string at the specified point, using the current text font,
339and the current text foreground and background colours.
340
341The coordinates refer to the top-left corner of the rectangle bounding
342the string. See \helpref{wxSVGFileDC::GetTextExtent}{wxdcgettextextent} for how
343to get the dimensions of a text string, which can be used to position the
344text more precisely.
345
346
347
348\membersection{wxSVGFileDC::EndDoc}\label{wxdcenddoc}
349
350\func{void}{EndDoc}{\void}
351
352Does nothing
353
354\membersection{wxSVGFileDC::EndDrawing}\label{wxdcenddrawing}
355
356\func{void}{EndDrawing}{\void}
357
358Does nothing
359
360\membersection{wxSVGFileDC::EndPage}\label{wxdcendpage}
361
362\func{void}{EndPage}{\void}
363
364Does 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
370Not implemented
371
372\membersection{wxSVGFileDC::GetBackground}\label{wxdcgetbackground}
373
374\func{wxBrush\&}{GetBackground}{\void}
375
376\constfunc{const wxBrush\&}{GetBackground}{\void}
377
378Gets 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
384Returns 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
396Gets the current brush (see \helpref{wxSVGFileDC::SetBrush}{wxdcsetbrush}).
397
398\membersection{wxSVGFileDC::GetCharHeight}\label{wxdcgetcharheight}
399
400\func{wxCoord}{GetCharHeight}{\void}
401
402Gets the character height of the currently set font.
403
404\membersection{wxSVGFileDC::GetCharWidth}\label{wxdcgetcharwidth}
405
406\func{wxCoord}{GetCharWidth}{\void}
407
408Gets 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
414Not implemented
415
416\membersection{wxSVGFileDC::GetFont}\label{wxdcgetfont}
417
418\func{wxFont\&}{GetFont}{\void}
419
420\constfunc{const wxFont\&}{GetFont}{\void}
421
422Gets the current font (see \helpref{wxSVGFileDC::SetFont}{wxdcsetfont}).
423
424\membersection{wxSVGFileDC::GetLogicalFunction}\label{wxdcgetlogicalfunction}
425
426\func{int}{GetLogicalFunction}{\void}
427
428Gets the current logical function (see \helpref{wxSVGFileDC::SetLogicalFunction}{wxdcsetlogicalfunction}).
429
430\membersection{wxSVGFileDC::GetMapMode}\label{wxdcgetmapmode}
431
432\func{int}{GetMapMode}{\void}
433
434Gets the {\it mapping mode} for the device context (see \helpref{wxSVGFileDC::SetMapMode}{wxdcsetmapmode}).
435
164e084a
CE
436\membersection{wxSVGFileDC::GetPen}\label{wxdcgetpen}
437
438\func{wxPen\&}{GetPen}{\void}
439
440\constfunc{const wxPen\&}{GetPen}{\void}
441
442Gets 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
448Not implemented
449
450\membersection{wxSVGFileDC::GetSize}\label{wxdcgetsize}
451
452\func{void}{GetSize}{\param{wxCoord *}{width}, \param{wxCoord *}{height}}
453
454
455For a Windows printer device context, this gets the horizontal and vertical
456resolution.
457
458\membersection{wxSVGFileDC::GetTextBackground}\label{wxdcgettextbackground}
459
460\func{wxColour\&}{GetTextBackground}{\void}
461
462\constfunc{const wxColour\&}{GetTextBackground}{\void}
463
464Gets 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
471Gets 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
473the total width and height respectively, {\it descent} is the
474dimension from the baseline of the font to the bottom of the
475descender, and {\it externalLeading} is any extra vertical space added
476to the font by the font designer (usually is zero).
477
478The optional parameter {\it font} specifies an alternative
479to the currently selected font: but note that this does not
480yet work under Windows, so you need to set a font for
481the device context first.
482
483See 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
491Gets 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
498Gets 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
504Converts logical X coordinate to device coordinate, using the current
505mapping mode.
506
507\membersection{wxSVGFileDC::LogicalToDeviceXRel}\label{wxdclogicaltodevicexrel}
508
509\func{wxCoord}{LogicalToDeviceXRel}{\param{wxCoord}{ x}}
510
511Converts logical X coordinate to relative device coordinate, using the current
512mapping mode but ignoring the x axis orientation.
513Use this for converting a width, for example.
514
515\membersection{wxSVGFileDC::LogicalToDeviceY}\label{wxdclogicaltodevicey}
516
517\func{wxCoord}{LogicalToDeviceY}{\param{wxCoord}{ y}}
518
519Converts logical Y coordinate to device coordinate, using the current
520mapping mode.
521
522\membersection{wxSVGFileDC::LogicalToDeviceYRel}\label{wxdclogicaltodeviceyrel}
523
524\func{wxCoord}{LogicalToDeviceYRel}{\param{wxCoord}{ y}}
525
526Converts logical Y coordinate to relative device coordinate, using the current
527mapping mode but ignoring the y axis orientation.
528Use this for converting a height, for example.
529
530\membersection{wxSVGFileDC::MaxX}\label{wxdcmaxx}
531
532\func{wxCoord}{MaxX}{\void}
533
534Gets the maximum horizontal extent used in drawing commands so far.
535
536\membersection{wxSVGFileDC::MaxY}\label{wxdcmaxy}
537
538\func{wxCoord}{MaxY}{\void}
539
540Gets the maximum vertical extent used in drawing commands so far.
541
542\membersection{wxSVGFileDC::MinX}\label{wxdcminx}
543
544\func{wxCoord}{MinX}{\void}
545
546Gets the minimum horizontal extent used in drawing commands so far.
547
548\membersection{wxSVGFileDC::MinY}\label{wxdcminy}
549
550\func{wxCoord}{MinY}{\void}
551
552Gets the minimum vertical extent used in drawing commands so far.
553
554\membersection{wxSVGFileDC::Ok}\label{wxdcok}
555
556\func{bool}{Ok}{\void}
557
ea76a6a5 558Returns true if the DC is ok to use; False values arise from being unable to
164e084a
CE
559write the file
560
561\membersection{wxSVGFileDC::ResetBoundingBox}\label{wxdcresetboundingbox}
562
563\func{void}{ResetBoundingBox}{\void}
564
565Resets the bounding box: after a call to this function, the bounding box
566doesn'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
577Sets the x and y axis orientation (i.e., the direction from lowest to
578highest values on the axis). The default orientation is the natural
579orientation, 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
584left to right orientation, false to invert it.}
585
586\docparam{yBottomUp}{True to set the y axis orientation to the natural
587bottom 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
593Sets the device origin (i.e., the origin in pixels after scaling has been
594applied).
595
596This function may be useful in Windows printing
597operations for placing a graphic on a page.
598
599\membersection{wxSVGFileDC::SetBackground}\label{wxdcsetbackground}
600
601\func{void}{SetBackground}{\param{const wxBrush\& }{brush}}
602
603Sets 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
610whether 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
622Not implemented
623
624
625\membersection{wxSVGFileDC::SetPalette}\label{wxdcsetpalette}
626
627\func{void}{SetPalette}{\param{const wxPalette\& }{palette}}
628
629Not implemented
630
631\membersection{wxSVGFileDC::SetBrush}\label{wxdcsetbrush}
632
633\func{void}{SetBrush}{\param{const wxBrush\& }{brush}}
634
635Sets the current brush for the DC.
636
637If the argument is wxNullBrush, the current brush is selected out of the device
638context, and the original brush restored, allowing the current brush to
639be destroyed safely.
640
641See also \helpref{wxBrush}{wxbrush}.
642
643See also \helpref{wxMemoryDC}{wxmemorydc} for the interpretation of colours
644when drawing into a monochrome bitmap.
645
646\membersection{wxSVGFileDC::SetFont}\label{wxdcsetfont}
647
648\func{void}{SetFont}{\param{const wxFont\& }{font}}
649
650Sets the current font for the DC. It must be a valid font, in particular you
651should not pass {\tt wxNullFont} to this method.
652
653See also \helpref{wxFont}{wxfont}.
654
655\membersection{wxSVGFileDC::SetLogicalFunction}\label{wxdcsetlogicalfunction}
656
657\func{void}{SetLogicalFunction}{\param{int}{ function}}
658
659
660Only 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
666The {\it mapping mode} of the device context defines the unit of
667measurement used to convert logical units to device units. Note that
668in X, text drawing isn't handled consistently with the mapping mode; a
669font is always specified in point size. However, setting the {\it
670user scale} (see \helpref{wxSVGFileDC::SetUserScale}{wxdcsetuserscale}) scales the text appropriately. In
671Windows, scaleable TrueType fonts are always used; in X, results depend
672on availability of fonts, but usually a reasonable match is found.
673
674Note that the coordinate origin should ideally be selectable, but for
675now is always at the top left of the screen/printer.
676
677Drawing to a Windows printer device context under UNIX
678uses the current mapping mode, but mapping mode is currently ignored for
679PostScript output.
680
681The 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
164e084a
CE
692\membersection{wxSVGFileDC::SetPen}\label{wxdcsetpen}
693
694\func{void}{SetPen}{\param{const wxPen\& }{pen}}
695
696Sets the current pen for the DC.
697
698If the argument is wxNullPen, the current pen is selected out of the device
699context, and the original pen restored.
700
701See also \helpref{wxMemoryDC}{wxmemorydc} for the interpretation of colours
702when drawing into a monochrome bitmap.
703
704\membersection{wxSVGFileDC::SetTextBackground}\label{wxdcsettextbackground}
705
706\func{void}{SetTextBackground}{\param{const wxColour\& }{colour}}
707
708Sets 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
714Sets the current text foreground colour for the DC.
715
716See also \helpref{wxMemoryDC}{wxmemorydc} for the interpretation of colours
717when drawing into a monochrome bitmap.
718
719\membersection{wxSVGFileDC::SetUserScale}\label{wxdcsetuserscale}
720
721\func{void}{SetUserScale}{\param{double}{ xScale}, \param{double}{ yScale}}
722
723Sets 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
730Does nothing
731
732\membersection{wxSVGFileDC::StartPage}\label{wxdcstartpage}
733
734\func{bool}{StartPage}{\void}
735
736Does nothing