diff options
author | Allan Sandfeld Jensen <allan.jensen@theqtcompany.com> | 2016-04-27 11:53:16 +0200 |
---|---|---|
committer | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2016-05-23 18:21:03 +0000 |
commit | 3cae115d6d6e8a1d4d0385e3cde16f59b25acad0 (patch) | |
tree | ddb7a083ea0de3d03c308381068ab4b72047f00a /src/gui/painting/qpainter.cpp | |
parent | ffd99e1d1803a8b82eab8d8b6c1cd9e58af36ee5 (diff) |
Correct compositionMode documentation
Most composition modes require an alpha-channel to be meaningful, but
not all, and there is no requirements of specific formats.
Change-Id: I11e930ccc07e9ff5df06dbda6745e4afb79f5e08
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
Diffstat (limited to 'src/gui/painting/qpainter.cpp')
-rw-r--r-- | src/gui/painting/qpainter.cpp | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/gui/painting/qpainter.cpp b/src/gui/painting/qpainter.cpp index 1acd84754a..51c0f3e22a 100644 --- a/src/gui/painting/qpainter.cpp +++ b/src/gui/painting/qpainter.cpp @@ -2182,11 +2182,10 @@ void QPainter::setBrushOrigin(const QPointF &p) destination pixel in such a way that the alpha component of the source defines the translucency of the pixel. - When the paint device is a QImage, the image format must be set to - \l {QImage::Format}{Format_ARGB32_Premultiplied} or - \l {QImage::Format}{Format_ARGB32} for the composition modes to have - any effect. For performance the premultiplied version is the preferred - format. + Several composition modes require an alpha channel in the source or + target images to have an effect. For optimal performance the + image format \l {QImage::Format}{Format_ARGB32_Premultiplied} is + preferred. When a composition mode is set it applies to all painting operator, pens, brushes, gradients and pixmap/image drawing. |