summaryrefslogtreecommitdiffstats
path: root/src/svg/qsvggenerator.cpp
diff options
context:
space:
mode:
authorDavid Boddie <dboddie@trolltech.com>2009-03-26 16:46:24 (GMT)
committerDavid Boddie <dboddie@trolltech.com>2009-03-26 16:46:24 (GMT)
commit30356a121cc6dff76c20409fd5648b5abb8ceb4e (patch)
tree85c3a7b233dd3ee73decd8a4a551a6ff71bb0e30 /src/svg/qsvggenerator.cpp
parent213d9224b81fd3350266e304b40f7469fbc0c695 (diff)
downloadQt-30356a121cc6dff76c20409fd5648b5abb8ceb4e.zip
Qt-30356a121cc6dff76c20409fd5648b5abb8ceb4e.tar.gz
Qt-30356a121cc6dff76c20409fd5648b5abb8ceb4e.tar.bz2
Squashed commit of the following:
commit 23e30464792f7e403e0815775eb7acbaad975238 Author: David Boddie <dboddie@trolltech.com> Date: Thu Mar 26 17:41:20 2009 +0100 Doc: Added some basic documentation for the QSvgGenerator class. Task-number: 244944 Reviewed-by: TrustMe commit f84c1806d2ba40a61499584562d754f65d43f854 Merge: 8a42be7... 213d922... Author: David Boddie <dboddie@trolltech.com> Date: Thu Mar 26 16:59:14 2009 +0100 Merge branch '4.5' of ../qt-45 into qt/4.5 commit 8a42be789077de45f8fd9f13afd177798df7495e Author: David Boddie <dboddie@trolltech.com> Date: Thu Mar 26 16:58:33 2009 +0100 Doc: Added missing pieces for the SVG Generator example. Reviewed-by: David Boddie <dboddie@trolltech.com>
Diffstat (limited to 'src/svg/qsvggenerator.cpp')
-rw-r--r--src/svg/qsvggenerator.cpp29
1 files changed, 28 insertions, 1 deletions
diff --git a/src/svg/qsvggenerator.cpp b/src/svg/qsvggenerator.cpp
index f7b2ae8..e822da5 100644
--- a/src/svg/qsvggenerator.cpp
+++ b/src/svg/qsvggenerator.cpp
@@ -516,7 +516,34 @@ public:
\brief The QSvgGenerator class provides a paint device that is used to create SVG drawings.
\reentrant
- \sa QSvgRenderer, QSvgWidget
+ This paint device represents a Scalable Vector Graphics (SVG) drawing. Like QPrinter, it is
+ designed as a write-only device that generates output in a specific format.
+
+ To write an SVG file, you first need to configure the output by setting the \l fileName
+ or \l outputDevice properties. It is usually necessary to specify the size of the drawing
+ by setting the \l size property, and in some cases where the drawing will be included in
+ another, the \l viewBox property also needs to be set.
+
+ \snippet examples/painting/svggenerator/window.cpp configure SVG generator
+
+ Other meta-data can be specified by setting the \a title, \a description and \a resolution
+ properties.
+
+ As with other QPaintDevice subclasses, a QPainter object is used to paint onto an instance
+ of this class:
+
+ \snippet examples/painting/svggenerator/window.cpp begin painting
+ \dots
+ \snippet examples/painting/svggenerator/window.cpp end painting
+
+ Painting is performed in the same way as for any other paint device. However,
+ it is necessary to use the QPainter::begin() and \l{QPainter::}{end()} to
+ explicitly begin and end painting on the device.
+
+ The \l{SVG Generator Example} shows how the same painting commands can be used
+ for painting a widget and writing an SVG file.
+
+ \sa QSvgRenderer, QSvgWidget, {About SVG}
*/
/*!