diff options
author | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2021-02-11 10:40:39 +0100 |
---|---|---|
committer | Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> | 2021-02-25 23:18:21 +0000 |
commit | 1c025842823cbfb02c3618da00ed4166e7eea8f4 (patch) | |
tree | 70353706a4b1dc839d8a207e9c6a222f44998f9f /src/gui/image/qimage.cpp | |
parent | 41fc143635c25f937a557f09890601f6c7d38736 (diff) |
Improve QImage::fill(uint) documentation
Remove paragraph about long gone methods, and rephrase it
as a note on corresponding getters. At the same time
document 64-bit behavior as undefined.
Change-Id: I26ffd95040eb0aea30585aa0fa8526417b0ecc7a
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
(cherry picked from commit e3ebbca5406ac02909823a07bfe6ae4db768f3da)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Diffstat (limited to 'src/gui/image/qimage.cpp')
-rw-r--r-- | src/gui/image/qimage.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/gui/image/qimage.cpp b/src/gui/image/qimage.cpp index 11eabcc9af..15fb928ce7 100644 --- a/src/gui/image/qimage.cpp +++ b/src/gui/image/qimage.cpp @@ -1674,11 +1674,11 @@ const uchar *QImage::constBits() const the depth is 8, the lowest 8 bits are used and if the depth is 16 the lowest 16 bits are used. - Note: QImage::pixel() returns the color of the pixel at the given - coordinates while QColor::pixel() returns the pixel value of the - underlying window system (essentially an index value), so normally - you will want to use QImage::pixel() to use a color from an - existing image or QColor::rgb() to use a specific color. + If the image depth is higher than 32bit the result is undefined. + + \note There are no corresponding value getter, though QImage::pixelIndex() + will return the same value for indexed formats, and QImage::pixel() for + RGB32, ARGB32, and ARGB32PM formats. \sa depth(), {QImage#Image Transformations}{Image Transformations} */ |