From 7518da2441852a243dc1f5ac23b3e59f7389cb3c Mon Sep 17 00:00:00 2001 From: Allan Sandfeld Jensen Date: Tue, 2 Apr 2019 10:02:03 +0200 Subject: Update scanline documentation Change-Id: I019b102e99f99377b528ad5c8a4ccb2a7929f14f Reviewed-by: Thiago Macieira --- src/gui/image/qimage.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/gui/image/qimage.cpp b/src/gui/image/qimage.cpp index ed6f23ee56..aca1f86bcb 100644 --- a/src/gui/image/qimage.cpp +++ b/src/gui/image/qimage.cpp @@ -1566,7 +1566,9 @@ void QImage::setColor(int i, QRgb c) Returns a pointer to the pixel data at the scanline with index \a i. The first scanline is at index 0. - The scanline data is aligned on a 32-bit boundary. + The scanline data is as minimum 32-bit aligned. For 64-bit formats + it follows the native alignment of 64-bit integers (64-bit for most + platforms, but notably 32-bit on i386). \warning If you are accessing 32-bpp image data, cast the returned pointer to \c{QRgb*} (QRgb has a 32-bit size) and use it to -- cgit v1.2.3