diff --git a/src/Magnum/GL/BufferImage.h b/src/Magnum/GL/BufferImage.h index 6bef0b395..9e7209b0f 100644 --- a/src/Magnum/GL/BufferImage.h +++ b/src/Magnum/GL/BufferImage.h @@ -278,7 +278,7 @@ template class BufferImage { /** * @brief Image buffer * - * @see @ref release() + * @see @ref release(), @ref size(), @ref pixelSize() */ Buffer& buffer() { return _buffer; } @@ -345,11 +345,16 @@ template class BufferImage { /** * @brief Size of a pixel in bytes * - * @see @ref Magnum::pixelFormatSize(), @ref GL::pixelFormatSize() + * @see @ref size(), @ref Magnum::pixelFormatSize(), + * @ref GL::pixelFormatSize() */ UnsignedInt pixelSize() const { return _pixelSize; } - /** @brief Image size in pixels */ + /** + * @brief Image size in pixels + * + * @see @ref pixelSize() + */ VectorTypeFor size() const { return _size; } /** @@ -621,7 +626,8 @@ template class CompressedBufferImage { /** * @brief Image buffer * - * @see @ref release() + * @see @ref release(), @ref size(), @ref blockSize(), + * @ref blockDataSize() */ Buffer& buffer() { return _buffer; } @@ -702,7 +708,8 @@ template class CompressedBufferImage { * Note that the blocks can be 3D even for 2D images and 2D or 3D even * for 1D images, in which case only the first slice in the extra * dimensions is used. - * @see @ref blockDataSize(), @ref compressedPixelFormatBlockSize() + * @see @ref blockDataSize(), @ref size(), + * @ref compressedPixelFormatBlockSize() */ Vector3i blockSize() const { return Vector3i{_blockSize}; } @@ -710,11 +717,18 @@ template class CompressedBufferImage { * @brief Size of a compressed block in bytes * @m_since_latest * - * @see @ref blockSize(), @ref compressedPixelFormatBlockDataSize() + * @see @ref blockSize(), @ref size(), + * @ref compressedPixelFormatBlockDataSize() */ UnsignedInt blockDataSize() const { return _blockDataSize; } - /** @brief Image size */ + /** + * @brief Image size in pixels + * + * If the size isn't divisible by @ref blockSize(), the edge blocks are + * still present in full but used only partially. + * @see @ref blockDataSize() + */ VectorTypeFor size() const { return _size; } /** diff --git a/src/Magnum/Image.h b/src/Magnum/Image.h index d9dcfc39d..666f249c9 100644 --- a/src/Magnum/Image.h +++ b/src/Magnum/Image.h @@ -394,7 +394,7 @@ template class Image { /** * @brief Raw image data * - * @see @ref release(), @ref pixels() + * @see @ref release(), @ref pixels(), @ref pixelSize() */ Containers::ArrayView data() & { return _data; } @@ -445,11 +445,15 @@ template class Image { /** * @brief Size of a pixel in bytes * - * @see @ref pixelFormatSize() + * @see @ref size(), @ref pixelFormatSize() */ UnsignedInt pixelSize() const { return _pixelSize; } - /** @brief Image size in pixels */ + /** + * @brief Image size in pixels + * + * @see @ref pixelSize() + */ /* Unlike other getters this one is a const& so it's possible to slice to the sizes when all images are in an array, for example for use in TextureTools atlas APIs */ @@ -733,7 +737,8 @@ template class CompressedImage { /** * @brief Raw image data * - * @see @ref release() + * @see @ref release(), @ref size(), @ref blockSize(), + * @ref blockDataSize() */ Containers::ArrayView data() & { return _data; } @@ -778,7 +783,8 @@ template class CompressedImage { * Note that the blocks can be 3D even for 2D images and 2D or 3D even * for 1D images, in which case only the first slice in the extra * dimensions is used. - * @see @ref blockDataSize(), @ref compressedPixelFormatBlockSize() + * @see @ref blockDataSize(), @ref size(), + * @ref compressedPixelFormatBlockSize() */ Vector3i blockSize() const { return Vector3i{_blockSize}; } @@ -786,11 +792,18 @@ template class CompressedImage { * @brief Size of a compressed block in bytes * @m_since_latest * - * @see @ref blockSize(), @ref compressedPixelFormatBlockDataSize() + * @see @ref blockSize(), @ref size(), + * @ref compressedPixelFormatBlockDataSize() */ UnsignedInt blockDataSize() const { return _blockDataSize; } - /** @brief Image size in pixels */ + /** + * @brief Image size in pixels + * + * If the size isn't divisible by @ref blockSize(), the edge blocks are + * still present in full but used only partially. + * @see @ref blockDataSize() + */ /* Unlike other getters this one is a const& so it's possible to slice to the sizes when all images are in an array, for example for use in TextureTools atlas APIs */ diff --git a/src/Magnum/ImageView.h b/src/Magnum/ImageView.h index 523fb21f0..48d36e78f 100644 --- a/src/Magnum/ImageView.h +++ b/src/Magnum/ImageView.h @@ -449,7 +449,7 @@ template class ImageView { /** * @brief Raw image data * - * @see @ref pixels() + * @see @ref pixels(), @ref size(), @ref pixelSize() */ Containers::ArrayView data() const { return _data; } @@ -488,11 +488,15 @@ template class ImageView { /** * @brief Size of a pixel in bytes * - * @see @ref pixelFormatSize() + * @see @ref size(), @ref pixelFormatSize() */ UnsignedInt pixelSize() const { return _pixelSize; } - /** @brief Image size in pixels */ + /** + * @brief Image size in pixels + * + * @see @ref pixelSize() + */ /* Unlike other getters this one is a const& so it's possible to slice to the sizes when all images are in an array, for example for use in TextureTools atlas APIs */ @@ -972,7 +976,11 @@ template class CompressedImageView { */ ImageFlags flags() const { return _flags; } - /** @brief Raw image data */ + /** + * @brief Raw image data + * + * @see @ref size(), @ref blockSize(), @ref blockDataSize() + */ Containers::ArrayView data() const { return _data; } /** @@ -1004,7 +1012,8 @@ template class CompressedImageView { * Note that the blocks can be 3D even for 2D images and 2D or 3D even * for 1D images, in which case only the first slice in the extra * dimensions is used. - * @see @ref blockDataSize(), @ref compressedPixelFormatBlockSize() + * @see @ref blockDataSize(), @ref size(), + * @ref compressedPixelFormatBlockSize() */ Vector3i blockSize() const { return Vector3i{_blockSize}; } @@ -1012,11 +1021,18 @@ template class CompressedImageView { * @brief Size of a compressed block in bytes * @m_since_latest * - * @see @ref blockSize(), @ref compressedPixelFormatBlockDataSize() + * @see @ref blockSize(), @ref size(), + * @ref compressedPixelFormatBlockDataSize() */ UnsignedInt blockDataSize() const { return _blockDataSize; } - /** @brief Image size in pixels */ + /** + * @brief Image size in pixels + * + * If the size isn't divisible by @ref blockSize(), the edge blocks are + * still present in full but used only partially. + * @see @ref blockDataSize() + */ /* Unlike other getters this one is a const& so it's possible to slice to the sizes when all images are in an array, for example for use in TextureTools atlas APIs */ diff --git a/src/Magnum/Trade/ImageData.h b/src/Magnum/Trade/ImageData.h index 76f9beb49..706e17cff 100644 --- a/src/Magnum/Trade/ImageData.h +++ b/src/Magnum/Trade/ImageData.h @@ -787,7 +787,8 @@ template class ImageData { /** * @brief Raw image data * - * @see @ref release(), @ref pixels() + * @see @ref release(), @ref pixels(), @ref size(), @ref pixelSize(), + * @ref blockSize(), @ref blockDataSize() */ Containers::ArrayView data() const & { return _data; } @@ -884,7 +885,7 @@ template class ImageData { * @brief Size of a pixel in bytes * * The image is expected to be uncompressed. - * @see @ref isCompressed(), @ref pixelFormatSize() + * @see @ref isCompressed(), @ref size(), @ref pixelFormatSize() */ UnsignedInt pixelSize() const; @@ -895,7 +896,7 @@ template class ImageData { * The image is expected to be compressed. Note that the blocks can be * 3D even for 2D images and 2D or 3D even for 1D images, in which case * only the first slice in the extra dimensions is used. - * @see @ref isCompressed(), @ref blockDataSize(), + * @see @ref isCompressed(), @ref blockDataSize(), @ref size(), * @ref compressedPixelFormatBlockSize() */ Vector3i blockSize() const; @@ -905,12 +906,19 @@ template class ImageData { * @m_since_latest * * The image is expected to be compressed. - * @see @ref isCompressed(), @ref blockSize(), + * @see @ref isCompressed(), @ref blockSize(), @ref size(), * @ref compressedPixelFormatBlockDataSize() */ UnsignedInt blockDataSize() const; - /** @brief Image size in pixels */ + /** + * @brief Image size in pixels + * + * For a compressed image, if the size isn't divisible by + * @ref blockSize(), the edge blocks are still present in full but used + * only partially. + * @see @ref isCompressed(), @ref pixelSize(), @ref blockDataSize() + */ /* Unlike other getters this one is a const& so it's possible to slice to the sizes when all images are in an array, for example for use in TextureTools atlas APIs */