]> git.saurik.com Git - wxWidgets.git/blame - docs/latex/wx/dcsvg.tex
wxHTTP::GetResponse() added (patch 794394)
[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
172Draw a bitmap on the device context at the specified point. If {\it transparent} is TRUE and the bitmap has
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
436\membersection{wxSVGFileDC::GetOptimization}\label{wxdcgetoptimization}
437
438\func{bool}{GetOptimization}{\void}
439
440Always 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
448Gets 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
454Not implemented
455
456\membersection{wxSVGFileDC::GetSize}\label{wxdcgetsize}
457
458\func{void}{GetSize}{\param{wxCoord *}{width}, \param{wxCoord *}{height}}
459
460
461For a Windows printer device context, this gets the horizontal and vertical
462resolution.
463
464\membersection{wxSVGFileDC::GetTextBackground}\label{wxdcgettextbackground}
465
466\func{wxColour\&}{GetTextBackground}{\void}
467
468\constfunc{const wxColour\&}{GetTextBackground}{\void}
469
470Gets 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
477Gets 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
479the total width and height respectively, {\it descent} is the
480dimension from the baseline of the font to the bottom of the
481descender, and {\it externalLeading} is any extra vertical space added
482to the font by the font designer (usually is zero).
483
484The optional parameter {\it font} specifies an alternative
485to the currently selected font: but note that this does not
486yet work under Windows, so you need to set a font for
487the device context first.
488
489See 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
497Gets 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
504Gets 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
510Converts logical X coordinate to device coordinate, using the current
511mapping mode.
512
513\membersection{wxSVGFileDC::LogicalToDeviceXRel}\label{wxdclogicaltodevicexrel}
514
515\func{wxCoord}{LogicalToDeviceXRel}{\param{wxCoord}{ x}}
516
517Converts logical X coordinate to relative device coordinate, using the current
518mapping mode but ignoring the x axis orientation.
519Use this for converting a width, for example.
520
521\membersection{wxSVGFileDC::LogicalToDeviceY}\label{wxdclogicaltodevicey}
522
523\func{wxCoord}{LogicalToDeviceY}{\param{wxCoord}{ y}}
524
525Converts logical Y coordinate to device coordinate, using the current
526mapping mode.
527
528\membersection{wxSVGFileDC::LogicalToDeviceYRel}\label{wxdclogicaltodeviceyrel}
529
530\func{wxCoord}{LogicalToDeviceYRel}{\param{wxCoord}{ y}}
531
532Converts logical Y coordinate to relative device coordinate, using the current
533mapping mode but ignoring the y axis orientation.
534Use this for converting a height, for example.
535
536\membersection{wxSVGFileDC::MaxX}\label{wxdcmaxx}
537
538\func{wxCoord}{MaxX}{\void}
539
540Gets the maximum horizontal extent used in drawing commands so far.
541
542\membersection{wxSVGFileDC::MaxY}\label{wxdcmaxy}
543
544\func{wxCoord}{MaxY}{\void}
545
546Gets the maximum vertical extent used in drawing commands so far.
547
548\membersection{wxSVGFileDC::MinX}\label{wxdcminx}
549
550\func{wxCoord}{MinX}{\void}
551
552Gets the minimum horizontal extent used in drawing commands so far.
553
554\membersection{wxSVGFileDC::MinY}\label{wxdcminy}
555
556\func{wxCoord}{MinY}{\void}
557
558Gets the minimum vertical extent used in drawing commands so far.
559
560\membersection{wxSVGFileDC::Ok}\label{wxdcok}
561
562\func{bool}{Ok}{\void}
563
564Returns TRUE if the DC is ok to use; False values arise from being unable to
565write the file
566
567\membersection{wxSVGFileDC::ResetBoundingBox}\label{wxdcresetboundingbox}
568
569\func{void}{ResetBoundingBox}{\void}
570
571Resets the bounding box: after a call to this function, the bounding box
572doesn'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
583Sets the x and y axis orientation (i.e., the direction from lowest to
584highest values on the axis). The default orientation is the natural
585orientation, 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
590left to right orientation, false to invert it.}
591
592\docparam{yBottomUp}{True to set the y axis orientation to the natural
593bottom 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
599Sets the device origin (i.e., the origin in pixels after scaling has been
600applied).
601
602This function may be useful in Windows printing
603operations for placing a graphic on a page.
604
605\membersection{wxSVGFileDC::SetBackground}\label{wxdcsetbackground}
606
607\func{void}{SetBackground}{\param{const wxBrush\& }{brush}}
608
609Sets 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
616whether 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
628Not implemented
629
630
631\membersection{wxSVGFileDC::SetPalette}\label{wxdcsetpalette}
632
633\func{void}{SetPalette}{\param{const wxPalette\& }{palette}}
634
635Not implemented
636
637\membersection{wxSVGFileDC::SetBrush}\label{wxdcsetbrush}
638
639\func{void}{SetBrush}{\param{const wxBrush\& }{brush}}
640
641Sets the current brush for the DC.
642
643If the argument is wxNullBrush, the current brush is selected out of the device
644context, and the original brush restored, allowing the current brush to
645be destroyed safely.
646
647See also \helpref{wxBrush}{wxbrush}.
648
649See also \helpref{wxMemoryDC}{wxmemorydc} for the interpretation of colours
650when drawing into a monochrome bitmap.
651
652\membersection{wxSVGFileDC::SetFont}\label{wxdcsetfont}
653
654\func{void}{SetFont}{\param{const wxFont\& }{font}}
655
656Sets the current font for the DC. It must be a valid font, in particular you
657should not pass {\tt wxNullFont} to this method.
658
659See also \helpref{wxFont}{wxfont}.
660
661\membersection{wxSVGFileDC::SetLogicalFunction}\label{wxdcsetlogicalfunction}
662
663\func{void}{SetLogicalFunction}{\param{int}{ function}}
664
665
666Only 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
672The {\it mapping mode} of the device context defines the unit of
673measurement used to convert logical units to device units. Note that
674in X, text drawing isn't handled consistently with the mapping mode; a
675font is always specified in point size. However, setting the {\it
676user scale} (see \helpref{wxSVGFileDC::SetUserScale}{wxdcsetuserscale}) scales the text appropriately. In
677Windows, scaleable TrueType fonts are always used; in X, results depend
678on availability of fonts, but usually a reasonable match is found.
679
680Note that the coordinate origin should ideally be selectable, but for
681now is always at the top left of the screen/printer.
682
683Drawing to a Windows printer device context under UNIX
684uses the current mapping mode, but mapping mode is currently ignored for
685PostScript output.
686
687The 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
702Does nothing
703
704\membersection{wxSVGFileDC::SetPen}\label{wxdcsetpen}
705
706\func{void}{SetPen}{\param{const wxPen\& }{pen}}
707
708Sets the current pen for the DC.
709
710If the argument is wxNullPen, the current pen is selected out of the device
711context, and the original pen restored.
712
713See also \helpref{wxMemoryDC}{wxmemorydc} for the interpretation of colours
714when drawing into a monochrome bitmap.
715
716\membersection{wxSVGFileDC::SetTextBackground}\label{wxdcsettextbackground}
717
718\func{void}{SetTextBackground}{\param{const wxColour\& }{colour}}
719
720Sets 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
726Sets the current text foreground colour for the DC.
727
728See also \helpref{wxMemoryDC}{wxmemorydc} for the interpretation of colours
729when drawing into a monochrome bitmap.
730
731\membersection{wxSVGFileDC::SetUserScale}\label{wxdcsetuserscale}
732
733\func{void}{SetUserScale}{\param{double}{ xScale}, \param{double}{ yScale}}
734
735Sets 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
742Does nothing
743
744\membersection{wxSVGFileDC::StartPage}\label{wxdcstartpage}
745
746\func{bool}{StartPage}{\void}
747
748Does nothing