summaryrefslogtreecommitdiffstats
path: root/doc/src/examples
diff options
context:
space:
mode:
authorCasper van Donderen <casper.vandonderen@nokia.com>2011-06-29 12:15:06 +0200
committerQt by Nokia <qt-info@nokia.com>2011-07-01 15:03:33 +0200
commit640c5d8a992f4ac6f9068aea9ec51a99a40dfc16 (patch)
tree703035f95b240303f3e42ab2a0c2397d1ca11ecc /doc/src/examples
parentdf515ded6096a3c24df7bc9307a12790a6f474e1 (diff)
Move the composition example in the docs.
Change-Id: I63e906e78de75466b9c9bf99d553691c8335f9b2 Reviewed-on: http://codereview.qt.nokia.com/903 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Kevin Wright <kevin.wright@nokia.com>
Diffstat (limited to 'doc/src/examples')
-rw-r--r--doc/src/examples/composition.qdoc44
1 files changed, 44 insertions, 0 deletions
diff --git a/doc/src/examples/composition.qdoc b/doc/src/examples/composition.qdoc
new file mode 100644
index 0000000000..53ca3dbf7a
--- /dev/null
+++ b/doc/src/examples/composition.qdoc
@@ -0,0 +1,44 @@
+/****************************************************************************
+**
+** Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies).
+** All rights reserved.
+** Contact: Nokia Corporation (qt-info@nokia.com)
+**
+** This file is part of the documentation of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:FDL$
+** GNU Free Documentation License
+** Alternatively, this file may be used under the terms of the GNU Free
+** Documentation License version 1.3 as published by the Free Software
+** Foundation and appearing in the file included in the packaging of
+** this file.
+**
+** Other Usage
+** Alternatively, this file may be used in accordance with the terms
+** and conditions contained in a signed written agreement between you
+** and Nokia.
+**
+**
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+/*!
+ \example painting/composition
+ \title Composition Modes
+
+ This demo shows some of the more advanced composition modes supported by Qt.
+
+ \image composition-demo.png
+
+ The two most common forms of composition are \bold{Source} and \bold{SourceOver}.
+ \bold{Source} is used to draw opaque objects onto a paint device. In this mode,
+ each pixel in the source replaces the corresponding pixel in the destination.
+ In \bold{SourceOver} composition mode, the source object is transparent and is
+ drawn on top of the destination.
+
+ In addition to these standard modes, Qt defines the complete set of composition modes
+ as defined by X. Porter and Y. Duff. See the QPainter documentation for details.
+*/