]> git.saurik.com Git - wxWidgets.git/blame - docs/latex/wx/dcsvg.tex
fixed doc wrong position of \wxheading{Library}
[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
a7af285d
VZ
62\wxheading{Library}
63
64\helpref{wxCore}{librarieslist}
65
164e084a
CE
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
79Constructors:
80a filename {\it f} with default size 340x240 at 72.0 dots per inch (a frequent screen resolution).
81a filename {\it f} with size {\it Width} by {\it Height} at 72.0 dots per inch
82a 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
88Destructor.
89
90\membersection{wxSVGFileDC::BeginDrawing}\label{wxdcbegindrawing}
91
92Does 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
100As wxDC: Copy from a source DC to this DC, specifying the destination
101coordinates, size of area to copy, source DC, source coordinates,
102logical 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
108Adds 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
117This 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
124Not Implemented
125
126\membersection{wxSVGFileDC::DestroyClippingRegion}\label{wxdcdestroyclippingregion}
127
128\func{void}{DestroyClippingRegion}{\void}
129
130Not Implemented
131
132\membersection{wxSVGFileDC::DeviceToLogicalX}\label{wxdcdevicetologicalx}
133
134\func{wxCoord}{DeviceToLogicalX}{\param{wxCoord}{ x}}
135
136Convert device X coordinate to logical coordinate, using the current
137mapping mode.
138
139\membersection{wxSVGFileDC::DeviceToLogicalXRel}\label{wxdcdevicetologicalxrel}
140
141\func{wxCoord}{DeviceToLogicalXRel}{\param{wxCoord}{ x}}
142
143Convert device X coordinate to relative logical coordinate, using the current
144mapping mode but ignoring the x axis orientation.
145Use this function for converting a width, for example.
146
147\membersection{wxSVGFileDC::DeviceToLogicalY}\label{wxdcdevicetologicaly}
148
149\func{wxCoord}{DeviceToLogicalY}{\param{wxCoord}{ y}}
150
151Converts device Y coordinate to logical coordinate, using the current
152mapping mode.
153
154\membersection{wxSVGFileDC::DeviceToLogicalYRel}\label{wxdcdevicetologicalyrel}
155
156\func{wxCoord}{DeviceToLogicalYRel}{\param{wxCoord}{ y}}
157
158Convert device Y coordinate to relative logical coordinate, using the current
159mapping mode but ignoring the y axis orientation.
160Use this function for converting a height, for example.
161
162\membersection{wxSVGFileDC::DrawArc}\label{wxdcdrawarc}
163
8bdd5efa 164\func{void}{DrawArc}{\param{wxCoord}{ x1}, \param{wxCoord}{ y1}, \param{wxCoord}{ x2}, \param{wxCoord}{ y2}, \param{wxCoord}{ xc}, \param{wxCoord}{ yc}}
164e084a
CE
165
166Draws an arc of a circle, centred on ({\it xc, yc}), with starting point ({\it x1, y1})
167and ending at ({\it x2, y2}). The current pen is used for the outline
168and the current brush for filling the shape.
169
170The 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
ea76a6a5 176Draw a bitmap on the device context at the specified point. If {\it transparent} is true and the bitmap has
164e084a
CE
177a transparency mask, the bitmap will be drawn transparently.
178
179When drawing a mono-bitmap, the current text foreground colour will be used to draw the foreground
180of 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
190Draws 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
198Draws 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
212Draws an ellipse contained in the rectangle specified either with the given top
213left corner and the given size or directly. The current pen is used for the
214outline 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
225Draws an arc of an ellipse. The current pen is used for drawing the arc and
226the 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
229the ellipse.
230
231{\it width} and {\it height} specify the width and height of the rectangle that contains
232the ellipse.
233
234{\it start} and {\it end} specify the start and end of the arc relative to the three-o'clock
235position from the center of the rectangle. Angles are specified
236in degrees (360 is a complete circle). Positive values mean
237counter-clockwise motion. If {\it start} is equal to {\it end}, a
238complete 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
244Draw an icon on the display (does nothing if the device context is PostScript).
245This 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
251Draws a line from the first point to the second. The current pen is used
252for 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
260Draws lines using an array of {\it points} of size {\it n}, or list of
261pointers to points, adding the optional offset coordinate. The current
262pen is used for drawing the lines. The programmer is responsible for
263deleting 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
273Draws a filled polygon using an array of {\it points} of size {\it n},
274or list of pointers to points, adding the optional offset coordinate.
275
276The last argument specifies the fill rule: {\bf wxODDEVEN\_RULE} (the
277default) or {\bf wxWINDING\_RULE}.
278
279The current pen is used for drawing the outline, and the current brush
280for filling the shape. Using a transparent brush suppresses filling.
281The programmer is responsible for deleting the list of points.
282
283Note 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
290Draws 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
296Draws a rectangle with the given top left corner, and with the given
297size. The current pen is used for the outline and the current brush
298for 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
304Draws the text rotated by {\it angle} degrees.
305
306The 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
312Draws a rectangle with the given top left corner, and with the given
313size. The corners are quarter-circles using the given radius. The
314current pen is used for the outline and the current brush for filling
315the shape.
316
317If {\it radius} is positive, the value is assumed to be the
318radius of the rounded corner. If {\it radius} is negative,
319the absolute value is assumed to be the {\it proportion} of the smallest
320dimension of the rectangle. This means that the corner can be
321a sensible size relative to the size of the rectangle, and also avoids
322the strange effects X produces when the corners are too big for
323the rectangle.
324
325\membersection{wxSVGFileDC::DrawSpline}\label{wxdcdrawspline}
326
327\func{void}{DrawSpline}{\param{wxList *}{points}}
328
329Draws a spline between all given control points, using the current
330pen. Doesn't delete the wxList and contents. The spline is drawn
331using a series of lines, using an algorithm taken from the X drawing
332program `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
336Draws 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
342Draws a text string at the specified point, using the current text font,
343and the current text foreground and background colours.
344
345The coordinates refer to the top-left corner of the rectangle bounding
346the string. See \helpref{wxSVGFileDC::GetTextExtent}{wxdcgettextextent} for how
347to get the dimensions of a text string, which can be used to position the
348text more precisely.
349
350
351
352\membersection{wxSVGFileDC::EndDoc}\label{wxdcenddoc}
353
354\func{void}{EndDoc}{\void}
355
356Does nothing
357
358\membersection{wxSVGFileDC::EndDrawing}\label{wxdcenddrawing}
359
360\func{void}{EndDrawing}{\void}
361
362Does nothing
363
364\membersection{wxSVGFileDC::EndPage}\label{wxdcendpage}
365
366\func{void}{EndPage}{\void}
367
368Does 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
374Not implemented
375
376\membersection{wxSVGFileDC::GetBackground}\label{wxdcgetbackground}
377
378\func{wxBrush\&}{GetBackground}{\void}
379
380\constfunc{const wxBrush\&}{GetBackground}{\void}
381
382Gets 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
388Returns 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
400Gets the current brush (see \helpref{wxSVGFileDC::SetBrush}{wxdcsetbrush}).
401
402\membersection{wxSVGFileDC::GetCharHeight}\label{wxdcgetcharheight}
403
404\func{wxCoord}{GetCharHeight}{\void}
405
406Gets the character height of the currently set font.
407
408\membersection{wxSVGFileDC::GetCharWidth}\label{wxdcgetcharwidth}
409
410\func{wxCoord}{GetCharWidth}{\void}
411
412Gets 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
418Not implemented
419
420\membersection{wxSVGFileDC::GetFont}\label{wxdcgetfont}
421
422\func{wxFont\&}{GetFont}{\void}
423
424\constfunc{const wxFont\&}{GetFont}{\void}
425
426Gets the current font (see \helpref{wxSVGFileDC::SetFont}{wxdcsetfont}).
427
428\membersection{wxSVGFileDC::GetLogicalFunction}\label{wxdcgetlogicalfunction}
429
430\func{int}{GetLogicalFunction}{\void}
431
432Gets the current logical function (see \helpref{wxSVGFileDC::SetLogicalFunction}{wxdcsetlogicalfunction}).
433
434\membersection{wxSVGFileDC::GetMapMode}\label{wxdcgetmapmode}
435
436\func{int}{GetMapMode}{\void}
437
438Gets the {\it mapping mode} for the device context (see \helpref{wxSVGFileDC::SetMapMode}{wxdcsetmapmode}).
439
164e084a
CE
440\membersection{wxSVGFileDC::GetPen}\label{wxdcgetpen}
441
442\func{wxPen\&}{GetPen}{\void}
443
444\constfunc{const wxPen\&}{GetPen}{\void}
445
446Gets 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
452Not implemented
453
454\membersection{wxSVGFileDC::GetSize}\label{wxdcgetsize}
455
456\func{void}{GetSize}{\param{wxCoord *}{width}, \param{wxCoord *}{height}}
457
458
459For a Windows printer device context, this gets the horizontal and vertical
460resolution.
461
462\membersection{wxSVGFileDC::GetTextBackground}\label{wxdcgettextbackground}
463
464\func{wxColour\&}{GetTextBackground}{\void}
465
466\constfunc{const wxColour\&}{GetTextBackground}{\void}
467
468Gets 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
475Gets 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
477the total width and height respectively, {\it descent} is the
478dimension from the baseline of the font to the bottom of the
479descender, and {\it externalLeading} is any extra vertical space added
480to the font by the font designer (usually is zero).
481
482The optional parameter {\it font} specifies an alternative
483to the currently selected font: but note that this does not
484yet work under Windows, so you need to set a font for
485the device context first.
486
487See 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
495Gets 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
502Gets 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
508Converts logical X coordinate to device coordinate, using the current
509mapping mode.
510
511\membersection{wxSVGFileDC::LogicalToDeviceXRel}\label{wxdclogicaltodevicexrel}
512
513\func{wxCoord}{LogicalToDeviceXRel}{\param{wxCoord}{ x}}
514
515Converts logical X coordinate to relative device coordinate, using the current
516mapping mode but ignoring the x axis orientation.
517Use this for converting a width, for example.
518
519\membersection{wxSVGFileDC::LogicalToDeviceY}\label{wxdclogicaltodevicey}
520
521\func{wxCoord}{LogicalToDeviceY}{\param{wxCoord}{ y}}
522
523Converts logical Y coordinate to device coordinate, using the current
524mapping mode.
525
526\membersection{wxSVGFileDC::LogicalToDeviceYRel}\label{wxdclogicaltodeviceyrel}
527
528\func{wxCoord}{LogicalToDeviceYRel}{\param{wxCoord}{ y}}
529
530Converts logical Y coordinate to relative device coordinate, using the current
531mapping mode but ignoring the y axis orientation.
532Use this for converting a height, for example.
533
534\membersection{wxSVGFileDC::MaxX}\label{wxdcmaxx}
535
536\func{wxCoord}{MaxX}{\void}
537
538Gets the maximum horizontal extent used in drawing commands so far.
539
540\membersection{wxSVGFileDC::MaxY}\label{wxdcmaxy}
541
542\func{wxCoord}{MaxY}{\void}
543
544Gets the maximum vertical extent used in drawing commands so far.
545
546\membersection{wxSVGFileDC::MinX}\label{wxdcminx}
547
548\func{wxCoord}{MinX}{\void}
549
550Gets the minimum horizontal extent used in drawing commands so far.
551
552\membersection{wxSVGFileDC::MinY}\label{wxdcminy}
553
554\func{wxCoord}{MinY}{\void}
555
556Gets the minimum vertical extent used in drawing commands so far.
557
558\membersection{wxSVGFileDC::Ok}\label{wxdcok}
559
560\func{bool}{Ok}{\void}
561
ea76a6a5 562Returns true if the DC is ok to use; False values arise from being unable to
164e084a
CE
563write the file
564
565\membersection{wxSVGFileDC::ResetBoundingBox}\label{wxdcresetboundingbox}
566
567\func{void}{ResetBoundingBox}{\void}
568
569Resets the bounding box: after a call to this function, the bounding box
570doesn'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
581Sets the x and y axis orientation (i.e., the direction from lowest to
582highest values on the axis). The default orientation is the natural
583orientation, 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
588left to right orientation, false to invert it.}
589
590\docparam{yBottomUp}{True to set the y axis orientation to the natural
591bottom 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
597Sets the device origin (i.e., the origin in pixels after scaling has been
598applied).
599
600This function may be useful in Windows printing
601operations for placing a graphic on a page.
602
603\membersection{wxSVGFileDC::SetBackground}\label{wxdcsetbackground}
604
605\func{void}{SetBackground}{\param{const wxBrush\& }{brush}}
606
607Sets 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
614whether 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
626Not implemented
627
628
629\membersection{wxSVGFileDC::SetPalette}\label{wxdcsetpalette}
630
631\func{void}{SetPalette}{\param{const wxPalette\& }{palette}}
632
633Not implemented
634
635\membersection{wxSVGFileDC::SetBrush}\label{wxdcsetbrush}
636
637\func{void}{SetBrush}{\param{const wxBrush\& }{brush}}
638
639Sets the current brush for the DC.
640
641If the argument is wxNullBrush, the current brush is selected out of the device
642context, and the original brush restored, allowing the current brush to
643be destroyed safely.
644
645See also \helpref{wxBrush}{wxbrush}.
646
647See also \helpref{wxMemoryDC}{wxmemorydc} for the interpretation of colours
648when drawing into a monochrome bitmap.
649
650\membersection{wxSVGFileDC::SetFont}\label{wxdcsetfont}
651
652\func{void}{SetFont}{\param{const wxFont\& }{font}}
653
654Sets the current font for the DC. It must be a valid font, in particular you
655should not pass {\tt wxNullFont} to this method.
656
657See also \helpref{wxFont}{wxfont}.
658
659\membersection{wxSVGFileDC::SetLogicalFunction}\label{wxdcsetlogicalfunction}
660
661\func{void}{SetLogicalFunction}{\param{int}{ function}}
662
663
664Only 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
670The {\it mapping mode} of the device context defines the unit of
671measurement used to convert logical units to device units. Note that
672in X, text drawing isn't handled consistently with the mapping mode; a
673font is always specified in point size. However, setting the {\it
674user scale} (see \helpref{wxSVGFileDC::SetUserScale}{wxdcsetuserscale}) scales the text appropriately. In
675Windows, scaleable TrueType fonts are always used; in X, results depend
676on availability of fonts, but usually a reasonable match is found.
677
678Note that the coordinate origin should ideally be selectable, but for
679now is always at the top left of the screen/printer.
680
681Drawing to a Windows printer device context under UNIX
682uses the current mapping mode, but mapping mode is currently ignored for
683PostScript output.
684
685The 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
164e084a
CE
696\membersection{wxSVGFileDC::SetPen}\label{wxdcsetpen}
697
698\func{void}{SetPen}{\param{const wxPen\& }{pen}}
699
700Sets the current pen for the DC.
701
702If the argument is wxNullPen, the current pen is selected out of the device
703context, and the original pen restored.
704
705See also \helpref{wxMemoryDC}{wxmemorydc} for the interpretation of colours
706when drawing into a monochrome bitmap.
707
708\membersection{wxSVGFileDC::SetTextBackground}\label{wxdcsettextbackground}
709
710\func{void}{SetTextBackground}{\param{const wxColour\& }{colour}}
711
712Sets 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
718Sets the current text foreground colour for the DC.
719
720See also \helpref{wxMemoryDC}{wxmemorydc} for the interpretation of colours
721when drawing into a monochrome bitmap.
722
723\membersection{wxSVGFileDC::SetUserScale}\label{wxdcsetuserscale}
724
725\func{void}{SetUserScale}{\param{double}{ xScale}, \param{double}{ yScale}}
726
727Sets 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
734Does nothing
735
736\membersection{wxSVGFileDC::StartPage}\label{wxdcstartpage}
737
738\func{bool}{StartPage}{\void}
739
740Does nothing