From 7d24e7a8447977341fe6efb7f08c0b5c1d8ab59f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Tue, 12 Jan 2021 12:49:43 +0100 Subject: [PATCH] doc: clarify some ambiguities. Apparently "pixel size" could have meant "image size in pixels" as well. Additionally also clarify what image size means, since it might be unclear especially for the block-compressed images. --- src/Magnum/GL/BufferImage.h | 4 ++-- src/Magnum/GL/PixelFormat.h | 2 +- src/Magnum/Image.h | 12 ++++++------ src/Magnum/ImageView.h | 14 +++++++------- src/Magnum/PixelFormat.h | 2 +- src/Magnum/Trade/ImageData.h | 12 ++++++------ 6 files changed, 23 insertions(+), 23 deletions(-) diff --git a/src/Magnum/GL/BufferImage.h b/src/Magnum/GL/BufferImage.h index 1be378c98..af509f32a 100644 --- a/src/Magnum/GL/BufferImage.h +++ b/src/Magnum/GL/BufferImage.h @@ -273,13 +273,13 @@ template class BufferImage { PixelType type() const { return _type; } /** - * @brief Pixel size (in bytes) + * @brief Size of a pixel in bytes * * @see @ref Magnum::pixelSize(), @ref GL::pixelSize() */ UnsignedInt pixelSize() const; - /** @brief Image size */ + /** @brief Image size in pixels */ VectorTypeFor size() const { return _size; } /** diff --git a/src/Magnum/GL/PixelFormat.h b/src/Magnum/GL/PixelFormat.h index 5b106d822..8b3efb5f5 100644 --- a/src/Magnum/GL/PixelFormat.h +++ b/src/Magnum/GL/PixelFormat.h @@ -681,7 +681,7 @@ to query availability of given format. MAGNUM_GL_EXPORT PixelType pixelType(Magnum::PixelFormat format, UnsignedInt extra = 0); /** -@brief Pixel size for given format/type combination (in bytes) +@brief Size of a pixel for given format/type combination in bytes @see @ref Magnum::pixelSize(), @ref PixelStorage::dataProperties() */ diff --git a/src/Magnum/Image.h b/src/Magnum/Image.h index 4c98bb680..0b8d31fbc 100644 --- a/src/Magnum/Image.h +++ b/src/Magnum/Image.h @@ -172,8 +172,8 @@ template class Image { * @param storage Storage of pixel data * @param format Format of pixel data * @param formatExtra Additional pixel format specifier - * @param pixelSize Size of a pixel in given format - * @param size Image size + * @param pixelSize Size of a pixel in given format, in bytes + * @param size Image size, in pixels * @param data Image data * * Unlike with @ref Image(PixelStorage, PixelFormat, const VectorTypeFor&, Containers::Array&&), @@ -200,7 +200,7 @@ template class Image { * @param storage Storage of pixel data * @param format Format of pixel data * @param formatExtra Additional pixel format specifier - * @param pixelSize Size of a pixel in given format + * @param pixelSize Size of a pixel in given format, in bytes * * Unlike with @ref Image(PixelStorage, PixelFormat), where pixel size * is calculated automatically using @ref pixelSize(PixelFormat), this @@ -362,13 +362,13 @@ template class Image { UnsignedInt formatExtra() const { return _formatExtra; } /** - * @brief Pixel size (in bytes) + * @brief Size of a pixel in bytes * * @see @ref pixelSize(PixelFormat) */ UnsignedInt pixelSize() const { return _pixelSize; } - /** @brief Image size */ + /** @brief Image size in pixels */ VectorTypeFor size() const { return _size; } /** @@ -632,7 +632,7 @@ template class CompressedImage { */ CompressedPixelFormat format() const { return _format; } - /** @brief Image size */ + /** @brief Image size in pixels */ VectorTypeFor size() const { return _size; } /** diff --git a/src/Magnum/ImageView.h b/src/Magnum/ImageView.h index fc96e2793..2f6e1d71b 100644 --- a/src/Magnum/ImageView.h +++ b/src/Magnum/ImageView.h @@ -214,8 +214,8 @@ template class ImageView { * @param storage Storage of pixel data * @param format Format of pixel data * @param formatExtra Additional pixel format specifier - * @param pixelSize Size of a pixel in given format - * @param size Image size + * @param pixelSize Size of a pixel in given format, in bytes + * @param size Image size, in pixels * @param data Image data * * Unlike with @ref ImageView(PixelStorage, PixelFormat, const VectorTypeFor&, Containers::ArrayView), @@ -242,8 +242,8 @@ template class ImageView { * @param storage Storage of pixel data * @param format Format of pixel data * @param formatExtra Additional pixel format specifier - * @param pixelSize Size of a pixel in given format - * @param size Image size + * @param pixelSize Size of a pixel in given format, in bytes + * @param size Image size, in pixels * * Unlike with @ref ImageView(PixelStorage, PixelFormat, const VectorTypeFor&), * where pixel size is calculated automatically using @@ -403,13 +403,13 @@ template class ImageView { UnsignedInt formatExtra() const { return _formatExtra; } /** - * @brief Pixel size (in bytes) + * @brief Size of a pixel in bytes * * @see @ref pixelSize(PixelFormat) */ UnsignedInt pixelSize() const { return _pixelSize; } - /** @brief Image size */ + /** @brief Image size in pixels */ constexpr VectorTypeFor size() const { return _size; } /** @@ -775,7 +775,7 @@ template class CompressedImageView { */ CompressedPixelFormat format() const { return _format; } - /** @brief Image size */ + /** @brief Image size in pixels */ constexpr VectorTypeFor size() const { return _size; } /** diff --git a/src/Magnum/PixelFormat.h b/src/Magnum/PixelFormat.h index 8b6a98885..50e0f468a 100644 --- a/src/Magnum/PixelFormat.h +++ b/src/Magnum/PixelFormat.h @@ -667,7 +667,7 @@ enum class PixelFormat: UnsignedInt { }; /** -@brief Pixel size +@brief Size of a pixel Expects that the pixel format is *not* implementation-specific. @see @ref isPixelFormatImplementationSpecific(), @ref GL::pixelSize() diff --git a/src/Magnum/Trade/ImageData.h b/src/Magnum/Trade/ImageData.h index 9f72dc50c..54e2b1245 100644 --- a/src/Magnum/Trade/ImageData.h +++ b/src/Magnum/Trade/ImageData.h @@ -179,8 +179,8 @@ template class ImageData { * @param storage Storage of pixel data * @param format Format of pixel data * @param formatExtra Additional pixel format specifier - * @param pixelSize Size of a pixel in given format - * @param size Image size + * @param pixelSize Size of a pixel in given format, in bytes + * @param size Image size, in pixels * @param data Image data * @param importerState Importer-specific state * @@ -211,8 +211,8 @@ template class ImageData { * @param storage Storage of pixel data * @param format Format of pixel data * @param formatExtra Additional pixel format specifier - * @param pixelSize Size of a pixel in given format - * @param size Image size + * @param pixelSize Size of a pixel in given format, in bytes + * @param size Image size, in pixels * @param dataFlags Data flags * @param data View on image data * @param importerState Importer-specific state @@ -516,14 +516,14 @@ template class ImageData { CompressedPixelFormat compressedFormat() const; /** - * @brief Pixel size (in bytes) + * @brief Size of a pixel in bytes * * The image is expected to be uncompressed. * @see @ref isCompressed(), @ref Magnum::pixelSize() */ UnsignedInt pixelSize() const; - /** @brief Image size */ + /** @brief Image size in pixels */ VectorTypeFor size() const { return _size; } /**