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{wxCore
}{librarieslist
}
68 %\helpref{Overview}{dcoverview}
71 \latexignore{\rtfignore{\wxheading{Members
}}}
73 \membersection{wxSVGFileDC::wxSVGFileDC
}
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
80 a filename
{\it f
} with default size
340x240 at
72.0 dots per inch (a frequent screen resolution).
81 a filename
{\it f
} with size
{\it Width
} by
{\it Height
} at
72.0 dots per inch
82 a filename
{\it f
} with size
{\it Width
} by
{\it Height
} at
{\it dpi
} resolution.
84 \membersection{wxSVGFileDC::
\destruct{wxSVGFileDC
}}
86 \func{}{\destruct{wxSVGFileDC
}}{\void}
90 \membersection{wxSVGFileDC::BeginDrawing
}\label{wxdcbegindrawing
}
94 \membersection{wxSVGFileDC::Blit
}\label{wxdcblit
}
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}}
100 As wxDC: Copy from a source DC to this DC, specifying the destination
101 coordinates, size of area to copy, source DC, source coordinates,
102 logical function, whether to use a bitmap mask, and mask source position.
104 \membersection{wxSVGFileDC::CalcBoundingBox
}\label{wxdccalcboundingbox
}
106 \func{void
}{CalcBoundingBox
}{\param{wxCoord
}{x
},
\param{wxCoord
}{y
}}
108 Adds 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.
113 \membersection{wxSVGFileDC::Clear
}\label{wxdcclear
}
115 \func{void
}{Clear
}{\void}
117 This makes no sense in wxSVGFileDC and does nothing
120 \membersection{wxSVGFileDC::CrossHair
}\label{wxdccrosshair
}
122 \func{void
}{CrossHair
}{\param{wxCoord
}{ x
},
\param{wxCoord
}{ y
}}
126 \membersection{wxSVGFileDC::DestroyClippingRegion
}\label{wxdcdestroyclippingregion
}
128 \func{void
}{DestroyClippingRegion
}{\void}
132 \membersection{wxSVGFileDC::DeviceToLogicalX
}\label{wxdcdevicetologicalx
}
134 \func{wxCoord
}{DeviceToLogicalX
}{\param{wxCoord
}{ x
}}
136 Convert device X coordinate to logical coordinate, using the current
139 \membersection{wxSVGFileDC::DeviceToLogicalXRel
}\label{wxdcdevicetologicalxrel
}
141 \func{wxCoord
}{DeviceToLogicalXRel
}{\param{wxCoord
}{ x
}}
143 Convert device X coordinate to relative logical coordinate, using the current
144 mapping mode but ignoring the x axis orientation.
145 Use this function for converting a width, for example.
147 \membersection{wxSVGFileDC::DeviceToLogicalY
}\label{wxdcdevicetologicaly
}
149 \func{wxCoord
}{DeviceToLogicalY
}{\param{wxCoord
}{ y
}}
151 Converts device Y coordinate to logical coordinate, using the current
154 \membersection{wxSVGFileDC::DeviceToLogicalYRel
}\label{wxdcdevicetologicalyrel
}
156 \func{wxCoord
}{DeviceToLogicalYRel
}{\param{wxCoord
}{ y
}}
158 Convert device Y coordinate to relative logical coordinate, using the current
159 mapping mode but ignoring the y axis orientation.
160 Use this function for converting a height, for example.
162 \membersection{wxSVGFileDC::DrawArc
}\label{wxdcdrawarc
}
164 \func{void
}{DrawArc
}{\param{wxCoord
}{ x1
},
\param{wxCoord
}{ y1
},
\param{wxCoord
}{ x2
},
\param{wxCoord
}{ y2
},
\param{wxCoord
}{ xc
},
\param{wxCoord
}{ yc
}}
166 Draws an arc of a circle, centred on (
{\it xc, yc
}), with starting point (
{\it x1, y1
})
167 and ending at (
{\it x2, y2
}). The current pen is used for the outline
168 and the current brush for filling the shape.
170 The arc is drawn in an anticlockwise direction from the start point to the end point.
172 \membersection{wxSVGFileDC::DrawBitmap
}\label{wxdcdrawbitmap
}
174 \func{void
}{DrawBitmap
}{\param{const wxBitmap\&
}{ bitmap
},
\param{wxCoord
}{ x
},
\param{wxCoord
}{ y
},
\param{bool
}{ transparent
}}
176 Draw a bitmap on the device context at the specified point. If
{\it transparent
} is true and the bitmap has
177 a transparency mask, the bitmap will be drawn transparently.
179 When drawing a mono-bitmap, the current text foreground colour will be used to draw the foreground
180 of 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
}.
184 \membersection{wxSVGFileDC::DrawCheckMark
}\label{wxdcdrawcheckmark
}
186 \func{void
}{DrawCheckMark
}{\param{wxCoord
}{ x
},
\param{wxCoord
}{ y
},
\param{wxCoord
}{ width
},
\param{wxCoord
}{ height
}}
188 \func{void
}{DrawCheckMark
}{\param{const wxRect \&
}{rect
}}
190 Draws a check mark inside the given rectangle.
192 \membersection{wxSVGFileDC::DrawCircle
}\label{wxdcdrawcircle
}
194 \func{void
}{DrawCircle
}{\param{wxCoord
}{ x
},
\param{wxCoord
}{ y
},
\param{wxCoord
}{ radius
}}
196 \func{void
}{DrawCircle
}{\param{const wxPoint\&
}{ pt
},
\param{wxCoord
}{ radius
}}
198 Draws a circle with the given centre and radius.
202 \helpref{DrawEllipse
}{wxdcdrawellipse
}
204 \membersection{wxSVGFileDC::DrawEllipse
}\label{wxdcdrawellipse
}
206 \func{void
}{DrawEllipse
}{\param{wxCoord
}{ x
},
\param{wxCoord
}{ y
},
\param{wxCoord
}{ width
},
\param{wxCoord
}{ height
}}
208 \func{void
}{DrawEllipse
}{\param{const wxPoint\&
}{ pt
},
\param{const wxSize\&
}{ size
}}
210 \func{void
}{DrawEllipse
}{\param{const wxRect\&
}{ rect
}}
212 Draws an ellipse contained in the rectangle specified either with the given top
213 left corner and the given size or directly. The current pen is used for the
214 outline and the current brush for filling the shape.
218 \helpref{DrawCircle
}{wxdcdrawcircle
}
220 \membersection{wxSVGFileDC::DrawEllipticArc
}\label{wxdcdrawellipticarc
}
222 \func{void
}{DrawEllipticArc
}{\param{wxCoord
}{ x
},
\param{wxCoord
}{ y
},
\param{wxCoord
}{ width
},
\param{wxCoord
}{ height
},
223 \param{double
}{ start
},
\param{double
}{ end
}}
225 Draws an arc of an ellipse. The current pen is used for drawing the arc and
226 the current brush is used for drawing the pie.
228 {\it x
} and
{\it y
} specify the x and y coordinates of the upper-left corner of the rectangle that contains
231 {\it width
} and
{\it height
} specify the width and height of the rectangle that contains
234 {\it start
} and
{\it end
} specify the start and end of the arc relative to the three-o'clock
235 position from the center of the rectangle. Angles are specified
236 in degrees (
360 is a complete circle). Positive values mean
237 counter-clockwise motion. If
{\it start
} is equal to
{\it end
}, a
238 complete ellipse will be drawn.
240 \membersection{wxSVGFileDC::DrawIcon
}\label{wxdcdrawicon
}
242 \func{void
}{DrawIcon
}{\param{const wxIcon\&
}{ icon
},
\param{wxCoord
}{ x
},
\param{wxCoord
}{ y
}}
244 Draw an icon on the display (does nothing if the device context is PostScript).
245 This can be the simplest way of drawing bitmaps on a window.
247 \membersection{wxSVGFileDC::DrawLine
}\label{wxdcdrawline
}
249 \func{void
}{DrawLine
}{\param{wxCoord
}{ x1
},
\param{wxCoord
}{ y1
},
\param{wxCoord
}{ x2
},
\param{wxCoord
}{ y2
}}
251 Draws a line from the first point to the second. The current pen is used
252 for drawing the line.
254 \membersection{wxSVGFileDC::DrawLines
}\label{wxdcdrawlines
}
256 \func{void
}{DrawLines
}{\param{int
}{ n
},
\param{wxPoint
}{ points
[]},
\param{wxCoord
}{ xoffset =
0},
\param{wxCoord
}{ yoffset =
0}}
258 \func{void
}{DrawLines
}{\param{wxList *
}{points
},
\param{wxCoord
}{ xoffset =
0},
\param{wxCoord
}{ yoffset =
0}}
260 Draws lines using an array of
{\it points
} of size
{\it n
}, or list of
261 pointers to points, adding the optional offset coordinate. The current
262 pen is used for drawing the lines. The programmer is responsible for
263 deleting the list of points.
265 \membersection{wxSVGFileDC::DrawPolygon
}\label{wxdcdrawpolygon
}
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}}
270 \func{void
}{DrawPolygon
}{\param{wxList *
}{points
},
\param{wxCoord
}{ xoffset =
0},
\param{wxCoord
}{ yoffset =
0},\\
271 \param{int
}{fill
\_style = wxODDEVEN
\_RULE}}
273 Draws a filled polygon using an array of
{\it points
} of size
{\it n
},
274 or list of pointers to points, adding the optional offset coordinate.
276 The last argument specifies the fill rule:
{\bf wxODDEVEN
\_RULE} (the
277 default) or
{\bf wxWINDING
\_RULE}.
279 The current pen is used for drawing the outline, and the current brush
280 for filling the shape. Using a transparent brush suppresses filling.
281 The programmer is responsible for deleting the list of points.
283 Note that wxWindows automatically closes the first and last points.
286 \membersection{wxSVGFileDC::DrawPoint
}\label{wxdcdrawpoint
}
288 \func{void
}{DrawPoint
}{\param{wxCoord
}{ x
},
\param{wxCoord
}{ y
}}
290 Draws a point using the current pen.
292 \membersection{wxSVGFileDC::DrawRectangle
}\label{wxdcdrawrectangle
}
294 \func{void
}{DrawRectangle
}{\param{wxCoord
}{ x
},
\param{wxCoord
}{ y
},
\param{wxCoord
}{ width
},
\param{wxCoord
}{ height
}}
296 Draws a rectangle with the given top left corner, and with the given
297 size. The current pen is used for the outline and the current brush
298 for filling the shape.
300 \membersection{wxSVGFileDC::DrawRotatedText
}\label{wxdcdrawrotatedtext
}
302 \func{void
}{DrawRotatedText
}{\param{const wxString\&
}{text
},
\param{wxCoord
}{ x
},
\param{wxCoord
}{ y
},
\param{double
}{ angle
}}
304 Draws the text rotated by
{\it angle
} degrees.
306 The wxMSW wxDC and wxSVGFileDC rotate the text around slightly different points, depending on the size of the font
308 \membersection{wxSVGFileDC::DrawRoundedRectangle
}\label{wxdcdrawroundedrectangle
}
310 \func{void
}{DrawRoundedRectangle
}{\param{wxCoord
}{ x
},
\param{wxCoord
}{ y
},
\param{wxCoord
}{ width
},
\param{wxCoord
}{ height
},
\param{double
}{ radius =
20}}
312 Draws a rectangle with the given top left corner, and with the given
313 size. The corners are quarter-circles using the given radius. The
314 current pen is used for the outline and the current brush for filling
317 If
{\it radius
} is positive, the value is assumed to be the
318 radius of the rounded corner. If
{\it radius
} is negative,
319 the absolute value is assumed to be the
{\it proportion
} of the smallest
320 dimension of the rectangle. This means that the corner can be
321 a sensible size relative to the size of the rectangle, and also avoids
322 the strange effects X produces when the corners are too big for
325 \membersection{wxSVGFileDC::DrawSpline
}\label{wxdcdrawspline
}
327 \func{void
}{DrawSpline
}{\param{wxList *
}{points
}}
329 Draws a spline between all given control points, using the current
330 pen. Doesn't delete the wxList and contents. The spline is drawn
331 using a series of lines, using an algorithm taken from the X drawing
334 \func{void
}{DrawSpline
}{\param{wxCoord
}{ x1
},
\param{wxCoord
}{ y1
},
\param{wxCoord
}{ x2
},
\param{wxCoord
}{ y2
},
\param{wxCoord
}{ x3
},
\param{wxCoord
}{ y3
}}
336 Draws a three-point spline using the current pen.
338 \membersection{wxSVGFileDC::DrawText
}\label{wxdcdrawtext
}
340 \func{void
}{DrawText
}{\param{const wxString\&
}{text
},
\param{wxCoord
}{ x
},
\param{wxCoord
}{ y
}}
342 Draws a text string at the specified point, using the current text font,
343 and the current text foreground and background colours.
345 The coordinates refer to the top-left corner of the rectangle bounding
346 the string. See
\helpref{wxSVGFileDC::GetTextExtent
}{wxdcgettextextent
} for how
347 to get the dimensions of a text string, which can be used to position the
352 \membersection{wxSVGFileDC::EndDoc
}\label{wxdcenddoc
}
354 \func{void
}{EndDoc
}{\void}
358 \membersection{wxSVGFileDC::EndDrawing
}\label{wxdcenddrawing
}
360 \func{void
}{EndDrawing
}{\void}
364 \membersection{wxSVGFileDC::EndPage
}\label{wxdcendpage
}
366 \func{void
}{EndPage
}{\void}
370 \membersection{wxSVGFileDC::FloodFill
}\label{wxdcfloodfill
}
372 \func{void
}{FloodFill
}{\param{wxCoord
}{ x
},
\param{wxCoord
}{ y
},
\param{const wxColour\&
}{ colour
},
\param{int
}{ style=wxFLOOD
\_SURFACE}}
376 \membersection{wxSVGFileDC::GetBackground
}\label{wxdcgetbackground
}
378 \func{wxBrush\&
}{GetBackground
}{\void}
380 \constfunc{const wxBrush\&
}{GetBackground
}{\void}
382 Gets the brush used for painting the background (see
\helpref{wxSVGFileDC::SetBackground
}{wxdcsetbackground
}).
384 \membersection{wxSVGFileDC::GetBackgroundMode
}\label{wxdcgetbackgroundmode
}
386 \constfunc{int
}{GetBackgroundMode
}{\void}
388 Returns the current background mode:
{\tt wxSOLID
} or
{\tt wxTRANSPARENT
}.
392 \helpref{SetBackgroundMode
}{wxdcsetbackgroundmode
}
394 \membersection{wxSVGFileDC::GetBrush
}\label{wxdcgetbrush
}
396 \func{wxBrush\&
}{GetBrush
}{\void}
398 \constfunc{const wxBrush\&
}{GetBrush
}{\void}
400 Gets the current brush (see
\helpref{wxSVGFileDC::SetBrush
}{wxdcsetbrush
}).
402 \membersection{wxSVGFileDC::GetCharHeight
}\label{wxdcgetcharheight
}
404 \func{wxCoord
}{GetCharHeight
}{\void}
406 Gets the character height of the currently set font.
408 \membersection{wxSVGFileDC::GetCharWidth
}\label{wxdcgetcharwidth
}
410 \func{wxCoord
}{GetCharWidth
}{\void}
412 Gets the average character width of the currently set font.
414 \membersection{wxSVGFileDC::GetClippingBox
}\label{wxdcgetclippingbox
}
416 \func{void
}{GetClippingBox
}{\param{wxCoord
}{ *x
},
\param{wxCoord
}{ *y
},
\param{wxCoord
}{ *width
},
\param{wxCoord
}{ *height
}}
420 \membersection{wxSVGFileDC::GetFont
}\label{wxdcgetfont
}
422 \func{wxFont\&
}{GetFont
}{\void}
424 \constfunc{const wxFont\&
}{GetFont
}{\void}
426 Gets the current font (see
\helpref{wxSVGFileDC::SetFont
}{wxdcsetfont
}).
428 \membersection{wxSVGFileDC::GetLogicalFunction
}\label{wxdcgetlogicalfunction
}
430 \func{int
}{GetLogicalFunction
}{\void}
432 Gets the current logical function (see
\helpref{wxSVGFileDC::SetLogicalFunction
}{wxdcsetlogicalfunction
}).
434 \membersection{wxSVGFileDC::GetMapMode
}\label{wxdcgetmapmode
}
436 \func{int
}{GetMapMode
}{\void}
438 Gets the
{\it mapping mode
} for the device context (see
\helpref{wxSVGFileDC::SetMapMode
}{wxdcsetmapmode
}).
440 \membersection{wxSVGFileDC::GetPen
}\label{wxdcgetpen
}
442 \func{wxPen\&
}{GetPen
}{\void}
444 \constfunc{const wxPen\&
}{GetPen
}{\void}
446 Gets the current pen (see
\helpref{wxSVGFileDC::SetPen
}{wxdcsetpen
}).
448 \membersection{wxSVGFileDC::GetPixel
}\label{wxdcgetpixel
}
450 \func{bool
}{GetPixel
}{\param{wxCoord
}{ x
},
\param{wxCoord
}{ y
},
\param{wxColour *
}{colour
}}
454 \membersection{wxSVGFileDC::GetSize
}\label{wxdcgetsize
}
456 \func{void
}{GetSize
}{\param{wxCoord *
}{width
},
\param{wxCoord *
}{height
}}
459 For a Windows printer device context, this gets the horizontal and vertical
462 \membersection{wxSVGFileDC::GetTextBackground
}\label{wxdcgettextbackground
}
464 \func{wxColour\&
}{GetTextBackground
}{\void}
466 \constfunc{const wxColour\&
}{GetTextBackground
}{\void}
468 Gets the current text background colour (see
\helpref{wxSVGFileDC::SetTextBackground
}{wxdcsettextbackground
}).
470 \membersection{wxSVGFileDC::GetTextExtent
}\label{wxdcgettextextent
}
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
}}
475 Gets 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
477 the total width and height respectively,
{\it descent
} is the
478 dimension from the baseline of the font to the bottom of the
479 descender, and
{\it externalLeading
} is any extra vertical space added
480 to the font by the font designer (usually is zero).
482 The optional parameter
{\it font
} specifies an alternative
483 to the currently selected font: but note that this does not
484 yet work under Windows, so you need to set a font for
485 the device context first.
487 See also
\helpref{wxFont
}{wxfont
},
\helpref{wxSVGFileDC::SetFont
}{wxdcsetfont
}.
489 \membersection{wxSVGFileDC::GetTextForeground
}\label{wxdcgettextforeground
}
491 \func{wxColour\&
}{GetTextForeground
}{\void}
493 \constfunc{const wxColour\&
}{GetTextForeground
}{\void}
495 Gets the current text foreground colour (see
\helpref{wxSVGFileDC::SetTextForeground
}{wxdcsettextforeground
}).
498 \membersection{wxSVGFileDC::GetUserScale
}\label{wxdcgetuserscale
}
500 \func{void
}{GetUserScale
}{\param{double
}{ *x
},
\param{double
}{ *y
}}
502 Gets the current user scale factor (set by
\helpref{SetUserScale
}{wxdcsetuserscale
}).
504 \membersection{wxSVGFileDC::LogicalToDeviceX
}\label{wxdclogicaltodevicex
}
506 \func{wxCoord
}{LogicalToDeviceX
}{\param{wxCoord
}{ x
}}
508 Converts logical X coordinate to device coordinate, using the current
511 \membersection{wxSVGFileDC::LogicalToDeviceXRel
}\label{wxdclogicaltodevicexrel
}
513 \func{wxCoord
}{LogicalToDeviceXRel
}{\param{wxCoord
}{ x
}}
515 Converts logical X coordinate to relative device coordinate, using the current
516 mapping mode but ignoring the x axis orientation.
517 Use this for converting a width, for example.
519 \membersection{wxSVGFileDC::LogicalToDeviceY
}\label{wxdclogicaltodevicey
}
521 \func{wxCoord
}{LogicalToDeviceY
}{\param{wxCoord
}{ y
}}
523 Converts logical Y coordinate to device coordinate, using the current
526 \membersection{wxSVGFileDC::LogicalToDeviceYRel
}\label{wxdclogicaltodeviceyrel
}
528 \func{wxCoord
}{LogicalToDeviceYRel
}{\param{wxCoord
}{ y
}}
530 Converts logical Y coordinate to relative device coordinate, using the current
531 mapping mode but ignoring the y axis orientation.
532 Use this for converting a height, for example.
534 \membersection{wxSVGFileDC::MaxX
}\label{wxdcmaxx
}
536 \func{wxCoord
}{MaxX
}{\void}
538 Gets the maximum horizontal extent used in drawing commands so far.
540 \membersection{wxSVGFileDC::MaxY
}\label{wxdcmaxy
}
542 \func{wxCoord
}{MaxY
}{\void}
544 Gets the maximum vertical extent used in drawing commands so far.
546 \membersection{wxSVGFileDC::MinX
}\label{wxdcminx
}
548 \func{wxCoord
}{MinX
}{\void}
550 Gets the minimum horizontal extent used in drawing commands so far.
552 \membersection{wxSVGFileDC::MinY
}\label{wxdcminy
}
554 \func{wxCoord
}{MinY
}{\void}
556 Gets the minimum vertical extent used in drawing commands so far.
558 \membersection{wxSVGFileDC::Ok
}\label{wxdcok
}
560 \func{bool
}{Ok
}{\void}
562 Returns true if the DC is ok to use; False values arise from being unable to
565 \membersection{wxSVGFileDC::ResetBoundingBox
}\label{wxdcresetboundingbox
}
567 \func{void
}{ResetBoundingBox
}{\void}
569 Resets the bounding box: after a call to this function, the bounding box
570 doesn't contain anything.
574 \helpref{CalcBoundingBox
}{wxdccalcboundingbox
}
576 \membersection{wxSVGFileDC::SetAxisOrientation
}\label{wxdcsetaxisorientation
}
578 \func{void
}{SetAxisOrientation
}{\param{bool
}{ xLeftRight
},
579 \param{bool
}{ yBottomUp
}}
581 Sets the x and y axis orientation (i.e., the direction from lowest to
582 highest values on the axis). The default orientation is the natural
583 orientation, e.g. x axis from left to right and y axis from bottom up.
585 \wxheading{Parameters
}
587 \docparam{xLeftRight
}{True to set the x axis orientation to the natural
588 left to right orientation, false to invert it.
}
590 \docparam{yBottomUp
}{True to set the y axis orientation to the natural
591 bottom up orientation, false to invert it.
}
593 \membersection{wxSVGFileDC::SetDeviceOrigin
}\label{wxdcsetdeviceorigin
}
595 \func{void
}{SetDeviceOrigin
}{\param{wxCoord
}{ x
},
\param{wxCoord
}{ y
}}
597 Sets the device origin (i.e., the origin in pixels after scaling has been
600 This function may be useful in Windows printing
601 operations for placing a graphic on a page.
603 \membersection{wxSVGFileDC::SetBackground
}\label{wxdcsetbackground
}
605 \func{void
}{SetBackground
}{\param{const wxBrush\&
}{brush
}}
607 Sets the current background brush for the DC.
609 \membersection{wxSVGFileDC::SetBackgroundMode
}\label{wxdcsetbackgroundmode
}
611 \func{void
}{SetBackgroundMode
}{\param{int
}{ mode
}}
613 {\it mode
} may be one of wxSOLID and wxTRANSPARENT. This setting determines
614 whether text will be drawn with a background colour or not.
616 \membersection{wxSVGFileDC::SetClippingRegion
}\label{wxdcsetclippingregion
}
618 \func{void
}{SetClippingRegion
}{\param{wxCoord
}{ x
},
\param{wxCoord
}{ y
},
\param{wxCoord
}{ width
},
\param{wxCoord
}{ height
}}
620 \func{void
}{SetClippingRegion
}{\param{const wxPoint\&
}{pt
},
\param{const wxSize\&
}{sz
}}
622 \func{void
}{SetClippingRegion
}{\param{const wxRect\&
}{ rect
}}
624 \func{void
}{SetClippingRegion
}{\param{const wxRegion\&
}{ region
}}
629 \membersection{wxSVGFileDC::SetPalette
}\label{wxdcsetpalette
}
631 \func{void
}{SetPalette
}{\param{const wxPalette\&
}{palette
}}
635 \membersection{wxSVGFileDC::SetBrush
}\label{wxdcsetbrush
}
637 \func{void
}{SetBrush
}{\param{const wxBrush\&
}{brush
}}
639 Sets the current brush for the DC.
641 If the argument is wxNullBrush, the current brush is selected out of the device
642 context, and the original brush restored, allowing the current brush to
645 See also
\helpref{wxBrush
}{wxbrush
}.
647 See also
\helpref{wxMemoryDC
}{wxmemorydc
} for the interpretation of colours
648 when drawing into a monochrome bitmap.
650 \membersection{wxSVGFileDC::SetFont
}\label{wxdcsetfont
}
652 \func{void
}{SetFont
}{\param{const wxFont\&
}{font
}}
654 Sets the current font for the DC. It must be a valid font, in particular you
655 should not pass
{\tt wxNullFont
} to this method.
657 See also
\helpref{wxFont
}{wxfont
}.
659 \membersection{wxSVGFileDC::SetLogicalFunction
}\label{wxdcsetlogicalfunction
}
661 \func{void
}{SetLogicalFunction
}{\param{int
}{ function
}}
664 Only wxCOPY is avalaible; trying to set one of the othe values will fail
666 \membersection{wxSVGFileDC::SetMapMode
}\label{wxdcsetmapmode
}
668 \func{void
}{SetMapMode
}{\param{int
}{ int
}}
670 The
{\it mapping mode
} of the device context defines the unit of
671 measurement used to convert logical units to device units. Note that
672 in X, text drawing isn't handled consistently with the mapping mode; a
673 font is always specified in point size. However, setting the
{\it
674 user scale
} (see
\helpref{wxSVGFileDC::SetUserScale
}{wxdcsetuserscale
}) scales the text appropriately. In
675 Windows, scaleable TrueType fonts are always used; in X, results depend
676 on availability of fonts, but usually a reasonable match is found.
678 Note that the coordinate origin should ideally be selectable, but for
679 now is always at the top left of the screen/printer.
681 Drawing to a Windows printer device context under UNIX
682 uses the current mapping mode, but mapping mode is currently ignored for
685 The mapping mode can be one of the following:
687 \begin{twocollist
}\itemsep=
0pt
688 \twocolitem{wxMM
\_TWIPS}{Each logical unit is
1/
20 of a point, or
1/
1440 of
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.
}
696 \membersection{wxSVGFileDC::SetPen
}\label{wxdcsetpen
}
698 \func{void
}{SetPen
}{\param{const wxPen\&
}{pen
}}
700 Sets the current pen for the DC.
702 If the argument is wxNullPen, the current pen is selected out of the device
703 context, and the original pen restored.
705 See also
\helpref{wxMemoryDC
}{wxmemorydc
} for the interpretation of colours
706 when drawing into a monochrome bitmap.
708 \membersection{wxSVGFileDC::SetTextBackground
}\label{wxdcsettextbackground
}
710 \func{void
}{SetTextBackground
}{\param{const wxColour\&
}{colour
}}
712 Sets the current text background colour for the DC.
714 \membersection{wxSVGFileDC::SetTextForeground
}\label{wxdcsettextforeground
}
716 \func{void
}{SetTextForeground
}{\param{const wxColour\&
}{colour
}}
718 Sets the current text foreground colour for the DC.
720 See also
\helpref{wxMemoryDC
}{wxmemorydc
} for the interpretation of colours
721 when drawing into a monochrome bitmap.
723 \membersection{wxSVGFileDC::SetUserScale
}\label{wxdcsetuserscale
}
725 \func{void
}{SetUserScale
}{\param{double
}{ xScale
},
\param{double
}{ yScale
}}
727 Sets the user scaling factor, useful for applications which require
730 \membersection{wxSVGFileDC::StartDoc
}\label{wxdcstartdoc
}
732 \func{bool
}{StartDoc
}{\param{const wxString\&
}{message
}}
736 \membersection{wxSVGFileDC::StartPage
}\label{wxdcstartpage
}
738 \func{bool
}{StartPage
}{\void}