1 \documentstyle[a4,makeidx,verbatim,texhelp,fancyhea,mysober,mytitle
]{report}%
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}}%
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
}%
15 \winhelponly{\title{Manual for wxSVGFileDC
}%
16 \author{by Chris Elliott
}%
21 \pagestyle{fancyplain
}%
22 \bibliographystyle{plain
}%
23 \pagenumbering{roman
}%
24 \setheader{{\it CONTENTS
}}{}{}{}{}{{\it CONTENTS
}}%
25 \setfooter{\thepage}{}{}{}{}{\thepage}%
28 \chapter*
{Copyright notice
}%
29 \setheader{{\it COPYRIGHT
}}{}{}{}{}{{\it COPYRIGHT
}}%
30 \setfooter{\thepage}{}{}{}{}{\thepage}%
32 \chapter*
{wxSVGFileDC
}%
33 \setheader{{\it wxSVGFileDC
}}{}{}{}{}{{\it wxSVGFileDC
}}%
34 \setfooter{\thepage}{}{}{}{}{\thepage}%
35 \section{\class{wxSVGFileDC
}}\label{wxSVGFileDC
}
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
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.
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.
51 A more substantial SVG library (for reading and writing) is available at
52 http://www.xs4all.nl/~kholwerd/wxstuff/canvas/htmldocbook/aap.html
54 \wxheading{Derived from
}
56 \helpref{wxDCBase
}{wxDCBase
}
58 \wxheading{Include files
}
64 %\helpref{Overview}{dcoverview}
67 \latexignore{\rtfignore{\wxheading{Members
}}}
69 \membersection{wxSVGFileDC::wxSVGFileDC
}
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
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.
80 \membersection{wxSVGFileDC::
\destruct{wxSVGFileDC
}}
82 \func{}{\destruct{wxSVGFileDC
}}{\void}
86 \membersection{wxSVGFileDC::BeginDrawing
}\label{wxdcbegindrawing
}
90 \membersection{wxSVGFileDC::Blit
}\label{wxdcblit
}
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}}
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.
100 \membersection{wxSVGFileDC::CalcBoundingBox
}\label{wxdccalcboundingbox
}
102 \func{void
}{CalcBoundingBox
}{\param{wxCoord
}{x
},
\param{wxCoord
}{y
}}
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.
109 \membersection{wxSVGFileDC::Clear
}\label{wxdcclear
}
111 \func{void
}{Clear
}{\void}
113 This makes no sense in wxSVGFileDC and does nothing
116 \membersection{wxSVGFileDC::CrossHair
}\label{wxdccrosshair
}
118 \func{void
}{CrossHair
}{\param{wxCoord
}{ x
},
\param{wxCoord
}{ y
}}
122 \membersection{wxSVGFileDC::DestroyClippingRegion
}\label{wxdcdestroyclippingregion
}
124 \func{void
}{DestroyClippingRegion
}{\void}
128 \membersection{wxSVGFileDC::DeviceToLogicalX
}\label{wxdcdevicetologicalx
}
130 \func{wxCoord
}{DeviceToLogicalX
}{\param{wxCoord
}{ x
}}
132 Convert device X coordinate to logical coordinate, using the current
135 \membersection{wxSVGFileDC::DeviceToLogicalXRel
}\label{wxdcdevicetologicalxrel
}
137 \func{wxCoord
}{DeviceToLogicalXRel
}{\param{wxCoord
}{ x
}}
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.
143 \membersection{wxSVGFileDC::DeviceToLogicalY
}\label{wxdcdevicetologicaly
}
145 \func{wxCoord
}{DeviceToLogicalY
}{\param{wxCoord
}{ y
}}
147 Converts device Y coordinate to logical coordinate, using the current
150 \membersection{wxSVGFileDC::DeviceToLogicalYRel
}\label{wxdcdevicetologicalyrel
}
152 \func{wxCoord
}{DeviceToLogicalYRel
}{\param{wxCoord
}{ y
}}
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.
158 \membersection{wxSVGFileDC::DrawArc
}\label{wxdcdrawarc
}
160 \func{void
}{DrawArc
}{\param{wxCoord
}{ x1
},
\param{wxCoord
}{ y1
},
\param{wxCoord
}{ x2
},
\param{wxCoord
}{ y2
},
\param{wxCoord
}{ xc
},
\param{wxCoord
}{ yc
}}
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.
166 The arc is drawn in an anticlockwise direction from the start point to the end point.
168 \membersection{wxSVGFileDC::DrawBitmap
}\label{wxdcdrawbitmap
}
170 \func{void
}{DrawBitmap
}{\param{const wxBitmap\&
}{ bitmap
},
\param{wxCoord
}{ x
},
\param{wxCoord
}{ y
},
\param{bool
}{ transparent
}}
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.
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
}.
180 \membersection{wxSVGFileDC::DrawCheckMark
}\label{wxdcdrawcheckmark
}
182 \func{void
}{DrawCheckMark
}{\param{wxCoord
}{ x
},
\param{wxCoord
}{ y
},
\param{wxCoord
}{ width
},
\param{wxCoord
}{ height
}}
184 \func{void
}{DrawCheckMark
}{\param{const wxRect \&
}{rect
}}
186 Draws a check mark inside the given rectangle.
188 \membersection{wxSVGFileDC::DrawCircle
}\label{wxdcdrawcircle
}
190 \func{void
}{DrawCircle
}{\param{wxCoord
}{ x
},
\param{wxCoord
}{ y
},
\param{wxCoord
}{ radius
}}
192 \func{void
}{DrawCircle
}{\param{const wxPoint\&
}{ pt
},
\param{wxCoord
}{ radius
}}
194 Draws a circle with the given centre and radius.
198 \helpref{DrawEllipse
}{wxdcdrawellipse
}
200 \membersection{wxSVGFileDC::DrawEllipse
}\label{wxdcdrawellipse
}
202 \func{void
}{DrawEllipse
}{\param{wxCoord
}{ x
},
\param{wxCoord
}{ y
},
\param{wxCoord
}{ width
},
\param{wxCoord
}{ height
}}
204 \func{void
}{DrawEllipse
}{\param{const wxPoint\&
}{ pt
},
\param{const wxSize\&
}{ size
}}
206 \func{void
}{DrawEllipse
}{\param{const wxRect\&
}{ rect
}}
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.
214 \helpref{DrawCircle
}{wxdcdrawcircle
}
216 \membersection{wxSVGFileDC::DrawEllipticArc
}\label{wxdcdrawellipticarc
}
218 \func{void
}{DrawEllipticArc
}{\param{wxCoord
}{ x
},
\param{wxCoord
}{ y
},
\param{wxCoord
}{ width
},
\param{wxCoord
}{ height
},
219 \param{double
}{ start
},
\param{double
}{ end
}}
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.
224 {\it x
} and
{\it y
} specify the x and y coordinates of the upper-left corner of the rectangle that contains
227 {\it width
} and
{\it height
} specify the width and height of the rectangle that contains
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.
236 \membersection{wxSVGFileDC::DrawIcon
}\label{wxdcdrawicon
}
238 \func{void
}{DrawIcon
}{\param{const wxIcon\&
}{ icon
},
\param{wxCoord
}{ x
},
\param{wxCoord
}{ y
}}
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.
243 \membersection{wxSVGFileDC::DrawLine
}\label{wxdcdrawline
}
245 \func{void
}{DrawLine
}{\param{wxCoord
}{ x1
},
\param{wxCoord
}{ y1
},
\param{wxCoord
}{ x2
},
\param{wxCoord
}{ y2
}}
247 Draws a line from the first point to the second. The current pen is used
248 for drawing the line.
250 \membersection{wxSVGFileDC::DrawLines
}\label{wxdcdrawlines
}
252 \func{void
}{DrawLines
}{\param{int
}{ n
},
\param{wxPoint
}{ points
[]},
\param{wxCoord
}{ xoffset =
0},
\param{wxCoord
}{ yoffset =
0}}
254 \func{void
}{DrawLines
}{\param{wxList *
}{points
},
\param{wxCoord
}{ xoffset =
0},
\param{wxCoord
}{ yoffset =
0}}
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.
261 \membersection{wxSVGFileDC::DrawPolygon
}\label{wxdcdrawpolygon
}
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}}
266 \func{void
}{DrawPolygon
}{\param{wxList *
}{points
},
\param{wxCoord
}{ xoffset =
0},
\param{wxCoord
}{ yoffset =
0},\\
267 \param{int
}{fill
\_style = wxODDEVEN
\_RULE}}
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.
272 The last argument specifies the fill rule:
{\bf wxODDEVEN
\_RULE} (the
273 default) or
{\bf wxWINDING
\_RULE}.
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.
279 Note that wxWindows automatically closes the first and last points.
282 \membersection{wxSVGFileDC::DrawPoint
}\label{wxdcdrawpoint
}
284 \func{void
}{DrawPoint
}{\param{wxCoord
}{ x
},
\param{wxCoord
}{ y
}}
286 Draws a point using the current pen.
288 \membersection{wxSVGFileDC::DrawRectangle
}\label{wxdcdrawrectangle
}
290 \func{void
}{DrawRectangle
}{\param{wxCoord
}{ x
},
\param{wxCoord
}{ y
},
\param{wxCoord
}{ width
},
\param{wxCoord
}{ height
}}
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.
296 \membersection{wxSVGFileDC::DrawRotatedText
}\label{wxdcdrawrotatedtext
}
298 \func{void
}{DrawRotatedText
}{\param{const wxString\&
}{text
},
\param{wxCoord
}{ x
},
\param{wxCoord
}{ y
},
\param{double
}{ angle
}}
300 Draws the text rotated by
{\it angle
} degrees.
302 The wxMSW wxDC and wxSVGFileDC rotate the text around slightly different points, depending on the size of the font
304 \membersection{wxSVGFileDC::DrawRoundedRectangle
}\label{wxdcdrawroundedrectangle
}
306 \func{void
}{DrawRoundedRectangle
}{\param{wxCoord
}{ x
},
\param{wxCoord
}{ y
},
\param{wxCoord
}{ width
},
\param{wxCoord
}{ height
},
\param{double
}{ radius =
20}}
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
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
321 \membersection{wxSVGFileDC::DrawSpline
}\label{wxdcdrawspline
}
323 \func{void
}{DrawSpline
}{\param{wxList *
}{points
}}
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
330 \func{void
}{DrawSpline
}{\param{wxCoord
}{ x1
},
\param{wxCoord
}{ y1
},
\param{wxCoord
}{ x2
},
\param{wxCoord
}{ y2
},
\param{wxCoord
}{ x3
},
\param{wxCoord
}{ y3
}}
332 Draws a three-point spline using the current pen.
334 \membersection{wxSVGFileDC::DrawText
}\label{wxdcdrawtext
}
336 \func{void
}{DrawText
}{\param{const wxString\&
}{text
},
\param{wxCoord
}{ x
},
\param{wxCoord
}{ y
}}
338 Draws a text string at the specified point, using the current text font,
339 and the current text foreground and background colours.
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
348 \membersection{wxSVGFileDC::EndDoc
}\label{wxdcenddoc
}
350 \func{void
}{EndDoc
}{\void}
354 \membersection{wxSVGFileDC::EndDrawing
}\label{wxdcenddrawing
}
356 \func{void
}{EndDrawing
}{\void}
360 \membersection{wxSVGFileDC::EndPage
}\label{wxdcendpage
}
362 \func{void
}{EndPage
}{\void}
366 \membersection{wxSVGFileDC::FloodFill
}\label{wxdcfloodfill
}
368 \func{void
}{FloodFill
}{\param{wxCoord
}{ x
},
\param{wxCoord
}{ y
},
\param{const wxColour\&
}{ colour
},
\param{int
}{ style=wxFLOOD
\_SURFACE}}
372 \membersection{wxSVGFileDC::GetBackground
}\label{wxdcgetbackground
}
374 \func{wxBrush\&
}{GetBackground
}{\void}
376 \constfunc{const wxBrush\&
}{GetBackground
}{\void}
378 Gets the brush used for painting the background (see
\helpref{wxSVGFileDC::SetBackground
}{wxdcsetbackground
}).
380 \membersection{wxSVGFileDC::GetBackgroundMode
}\label{wxdcgetbackgroundmode
}
382 \constfunc{int
}{GetBackgroundMode
}{\void}
384 Returns the current background mode:
{\tt wxSOLID
} or
{\tt wxTRANSPARENT
}.
388 \helpref{SetBackgroundMode
}{wxdcsetbackgroundmode
}
390 \membersection{wxSVGFileDC::GetBrush
}\label{wxdcgetbrush
}
392 \func{wxBrush\&
}{GetBrush
}{\void}
394 \constfunc{const wxBrush\&
}{GetBrush
}{\void}
396 Gets the current brush (see
\helpref{wxSVGFileDC::SetBrush
}{wxdcsetbrush
}).
398 \membersection{wxSVGFileDC::GetCharHeight
}\label{wxdcgetcharheight
}
400 \func{wxCoord
}{GetCharHeight
}{\void}
402 Gets the character height of the currently set font.
404 \membersection{wxSVGFileDC::GetCharWidth
}\label{wxdcgetcharwidth
}
406 \func{wxCoord
}{GetCharWidth
}{\void}
408 Gets the average character width of the currently set font.
410 \membersection{wxSVGFileDC::GetClippingBox
}\label{wxdcgetclippingbox
}
412 \func{void
}{GetClippingBox
}{\param{wxCoord
}{ *x
},
\param{wxCoord
}{ *y
},
\param{wxCoord
}{ *width
},
\param{wxCoord
}{ *height
}}
416 \membersection{wxSVGFileDC::GetFont
}\label{wxdcgetfont
}
418 \func{wxFont\&
}{GetFont
}{\void}
420 \constfunc{const wxFont\&
}{GetFont
}{\void}
422 Gets the current font (see
\helpref{wxSVGFileDC::SetFont
}{wxdcsetfont
}).
424 \membersection{wxSVGFileDC::GetLogicalFunction
}\label{wxdcgetlogicalfunction
}
426 \func{int
}{GetLogicalFunction
}{\void}
428 Gets the current logical function (see
\helpref{wxSVGFileDC::SetLogicalFunction
}{wxdcsetlogicalfunction
}).
430 \membersection{wxSVGFileDC::GetMapMode
}\label{wxdcgetmapmode
}
432 \func{int
}{GetMapMode
}{\void}
434 Gets the
{\it mapping mode
} for the device context (see
\helpref{wxSVGFileDC::SetMapMode
}{wxdcsetmapmode
}).
436 \membersection{wxSVGFileDC::GetPen
}\label{wxdcgetpen
}
438 \func{wxPen\&
}{GetPen
}{\void}
440 \constfunc{const wxPen\&
}{GetPen
}{\void}
442 Gets the current pen (see
\helpref{wxSVGFileDC::SetPen
}{wxdcsetpen
}).
444 \membersection{wxSVGFileDC::GetPixel
}\label{wxdcgetpixel
}
446 \func{bool
}{GetPixel
}{\param{wxCoord
}{ x
},
\param{wxCoord
}{ y
},
\param{wxColour *
}{colour
}}
450 \membersection{wxSVGFileDC::GetSize
}\label{wxdcgetsize
}
452 \func{void
}{GetSize
}{\param{wxCoord *
}{width
},
\param{wxCoord *
}{height
}}
455 For a Windows printer device context, this gets the horizontal and vertical
458 \membersection{wxSVGFileDC::GetTextBackground
}\label{wxdcgettextbackground
}
460 \func{wxColour\&
}{GetTextBackground
}{\void}
462 \constfunc{const wxColour\&
}{GetTextBackground
}{\void}
464 Gets the current text background colour (see
\helpref{wxSVGFileDC::SetTextBackground
}{wxdcsettextbackground
}).
466 \membersection{wxSVGFileDC::GetTextExtent
}\label{wxdcgettextextent
}
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
}}
471 Gets 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
473 the total width and height respectively,
{\it descent
} is the
474 dimension from the baseline of the font to the bottom of the
475 descender, and
{\it externalLeading
} is any extra vertical space added
476 to the font by the font designer (usually is zero).
478 The optional parameter
{\it font
} specifies an alternative
479 to the currently selected font: but note that this does not
480 yet work under Windows, so you need to set a font for
481 the device context first.
483 See also
\helpref{wxFont
}{wxfont
},
\helpref{wxSVGFileDC::SetFont
}{wxdcsetfont
}.
485 \membersection{wxSVGFileDC::GetTextForeground
}\label{wxdcgettextforeground
}
487 \func{wxColour\&
}{GetTextForeground
}{\void}
489 \constfunc{const wxColour\&
}{GetTextForeground
}{\void}
491 Gets the current text foreground colour (see
\helpref{wxSVGFileDC::SetTextForeground
}{wxdcsettextforeground
}).
494 \membersection{wxSVGFileDC::GetUserScale
}\label{wxdcgetuserscale
}
496 \func{void
}{GetUserScale
}{\param{double
}{ *x
},
\param{double
}{ *y
}}
498 Gets the current user scale factor (set by
\helpref{SetUserScale
}{wxdcsetuserscale
}).
500 \membersection{wxSVGFileDC::LogicalToDeviceX
}\label{wxdclogicaltodevicex
}
502 \func{wxCoord
}{LogicalToDeviceX
}{\param{wxCoord
}{ x
}}
504 Converts logical X coordinate to device coordinate, using the current
507 \membersection{wxSVGFileDC::LogicalToDeviceXRel
}\label{wxdclogicaltodevicexrel
}
509 \func{wxCoord
}{LogicalToDeviceXRel
}{\param{wxCoord
}{ x
}}
511 Converts logical X coordinate to relative device coordinate, using the current
512 mapping mode but ignoring the x axis orientation.
513 Use this for converting a width, for example.
515 \membersection{wxSVGFileDC::LogicalToDeviceY
}\label{wxdclogicaltodevicey
}
517 \func{wxCoord
}{LogicalToDeviceY
}{\param{wxCoord
}{ y
}}
519 Converts logical Y coordinate to device coordinate, using the current
522 \membersection{wxSVGFileDC::LogicalToDeviceYRel
}\label{wxdclogicaltodeviceyrel
}
524 \func{wxCoord
}{LogicalToDeviceYRel
}{\param{wxCoord
}{ y
}}
526 Converts logical Y coordinate to relative device coordinate, using the current
527 mapping mode but ignoring the y axis orientation.
528 Use this for converting a height, for example.
530 \membersection{wxSVGFileDC::MaxX
}\label{wxdcmaxx
}
532 \func{wxCoord
}{MaxX
}{\void}
534 Gets the maximum horizontal extent used in drawing commands so far.
536 \membersection{wxSVGFileDC::MaxY
}\label{wxdcmaxy
}
538 \func{wxCoord
}{MaxY
}{\void}
540 Gets the maximum vertical extent used in drawing commands so far.
542 \membersection{wxSVGFileDC::MinX
}\label{wxdcminx
}
544 \func{wxCoord
}{MinX
}{\void}
546 Gets the minimum horizontal extent used in drawing commands so far.
548 \membersection{wxSVGFileDC::MinY
}\label{wxdcminy
}
550 \func{wxCoord
}{MinY
}{\void}
552 Gets the minimum vertical extent used in drawing commands so far.
554 \membersection{wxSVGFileDC::Ok
}\label{wxdcok
}
556 \func{bool
}{Ok
}{\void}
558 Returns true if the DC is ok to use; False values arise from being unable to
561 \membersection{wxSVGFileDC::ResetBoundingBox
}\label{wxdcresetboundingbox
}
563 \func{void
}{ResetBoundingBox
}{\void}
565 Resets the bounding box: after a call to this function, the bounding box
566 doesn't contain anything.
570 \helpref{CalcBoundingBox
}{wxdccalcboundingbox
}
572 \membersection{wxSVGFileDC::SetAxisOrientation
}\label{wxdcsetaxisorientation
}
574 \func{void
}{SetAxisOrientation
}{\param{bool
}{ xLeftRight
},
575 \param{bool
}{ yBottomUp
}}
577 Sets the x and y axis orientation (i.e., the direction from lowest to
578 highest values on the axis). The default orientation is the natural
579 orientation, e.g. x axis from left to right and y axis from bottom up.
581 \wxheading{Parameters
}
583 \docparam{xLeftRight
}{True to set the x axis orientation to the natural
584 left to right orientation, false to invert it.
}
586 \docparam{yBottomUp
}{True to set the y axis orientation to the natural
587 bottom up orientation, false to invert it.
}
589 \membersection{wxSVGFileDC::SetDeviceOrigin
}\label{wxdcsetdeviceorigin
}
591 \func{void
}{SetDeviceOrigin
}{\param{wxCoord
}{ x
},
\param{wxCoord
}{ y
}}
593 Sets the device origin (i.e., the origin in pixels after scaling has been
596 This function may be useful in Windows printing
597 operations for placing a graphic on a page.
599 \membersection{wxSVGFileDC::SetBackground
}\label{wxdcsetbackground
}
601 \func{void
}{SetBackground
}{\param{const wxBrush\&
}{brush
}}
603 Sets the current background brush for the DC.
605 \membersection{wxSVGFileDC::SetBackgroundMode
}\label{wxdcsetbackgroundmode
}
607 \func{void
}{SetBackgroundMode
}{\param{int
}{ mode
}}
609 {\it mode
} may be one of wxSOLID and wxTRANSPARENT. This setting determines
610 whether text will be drawn with a background colour or not.
612 \membersection{wxSVGFileDC::SetClippingRegion
}\label{wxdcsetclippingregion
}
614 \func{void
}{SetClippingRegion
}{\param{wxCoord
}{ x
},
\param{wxCoord
}{ y
},
\param{wxCoord
}{ width
},
\param{wxCoord
}{ height
}}
616 \func{void
}{SetClippingRegion
}{\param{const wxPoint\&
}{pt
},
\param{const wxSize\&
}{sz
}}
618 \func{void
}{SetClippingRegion
}{\param{const wxRect\&
}{ rect
}}
620 \func{void
}{SetClippingRegion
}{\param{const wxRegion\&
}{ region
}}
625 \membersection{wxSVGFileDC::SetPalette
}\label{wxdcsetpalette
}
627 \func{void
}{SetPalette
}{\param{const wxPalette\&
}{palette
}}
631 \membersection{wxSVGFileDC::SetBrush
}\label{wxdcsetbrush
}
633 \func{void
}{SetBrush
}{\param{const wxBrush\&
}{brush
}}
635 Sets the current brush for the DC.
637 If the argument is wxNullBrush, the current brush is selected out of the device
638 context, and the original brush restored, allowing the current brush to
641 See also
\helpref{wxBrush
}{wxbrush
}.
643 See also
\helpref{wxMemoryDC
}{wxmemorydc
} for the interpretation of colours
644 when drawing into a monochrome bitmap.
646 \membersection{wxSVGFileDC::SetFont
}\label{wxdcsetfont
}
648 \func{void
}{SetFont
}{\param{const wxFont\&
}{font
}}
650 Sets the current font for the DC. It must be a valid font, in particular you
651 should not pass
{\tt wxNullFont
} to this method.
653 See also
\helpref{wxFont
}{wxfont
}.
655 \membersection{wxSVGFileDC::SetLogicalFunction
}\label{wxdcsetlogicalfunction
}
657 \func{void
}{SetLogicalFunction
}{\param{int
}{ function
}}
660 Only wxCOPY is avalaible; trying to set one of the othe values will fail
662 \membersection{wxSVGFileDC::SetMapMode
}\label{wxdcsetmapmode
}
664 \func{void
}{SetMapMode
}{\param{int
}{ int
}}
666 The
{\it mapping mode
} of the device context defines the unit of
667 measurement used to convert logical units to device units. Note that
668 in X, text drawing isn't handled consistently with the mapping mode; a
669 font is always specified in point size. However, setting the
{\it
670 user scale
} (see
\helpref{wxSVGFileDC::SetUserScale
}{wxdcsetuserscale
}) scales the text appropriately. In
671 Windows, scaleable TrueType fonts are always used; in X, results depend
672 on availability of fonts, but usually a reasonable match is found.
674 Note that the coordinate origin should ideally be selectable, but for
675 now is always at the top left of the screen/printer.
677 Drawing to a Windows printer device context under UNIX
678 uses the current mapping mode, but mapping mode is currently ignored for
681 The mapping mode can be one of the following:
683 \begin{twocollist
}\itemsep=
0pt
684 \twocolitem{wxMM
\_TWIPS}{Each logical unit is
1/
20 of a point, or
1/
1440 of
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.
}
692 \membersection{wxSVGFileDC::SetPen
}\label{wxdcsetpen
}
694 \func{void
}{SetPen
}{\param{const wxPen\&
}{pen
}}
696 Sets the current pen for the DC.
698 If the argument is wxNullPen, the current pen is selected out of the device
699 context, and the original pen restored.
701 See also
\helpref{wxMemoryDC
}{wxmemorydc
} for the interpretation of colours
702 when drawing into a monochrome bitmap.
704 \membersection{wxSVGFileDC::SetTextBackground
}\label{wxdcsettextbackground
}
706 \func{void
}{SetTextBackground
}{\param{const wxColour\&
}{colour
}}
708 Sets the current text background colour for the DC.
710 \membersection{wxSVGFileDC::SetTextForeground
}\label{wxdcsettextforeground
}
712 \func{void
}{SetTextForeground
}{\param{const wxColour\&
}{colour
}}
714 Sets the current text foreground colour for the DC.
716 See also
\helpref{wxMemoryDC
}{wxmemorydc
} for the interpretation of colours
717 when drawing into a monochrome bitmap.
719 \membersection{wxSVGFileDC::SetUserScale
}\label{wxdcsetuserscale
}
721 \func{void
}{SetUserScale
}{\param{double
}{ xScale
},
\param{double
}{ yScale
}}
723 Sets the user scaling factor, useful for applications which require
726 \membersection{wxSVGFileDC::StartDoc
}\label{wxdcstartdoc
}
728 \func{bool
}{StartDoc
}{\param{const wxString\&
}{message
}}
732 \membersection{wxSVGFileDC::StartPage
}\label{wxdcstartpage
}
734 \func{bool
}{StartPage
}{\void}