Browse Source

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.
pull/494/head
Vladimír Vondruš 5 years ago
parent
commit
7d24e7a844
  1. 4
      src/Magnum/GL/BufferImage.h
  2. 2
      src/Magnum/GL/PixelFormat.h
  3. 12
      src/Magnum/Image.h
  4. 14
      src/Magnum/ImageView.h
  5. 2
      src/Magnum/PixelFormat.h
  6. 12
      src/Magnum/Trade/ImageData.h

4
src/Magnum/GL/BufferImage.h

@ -273,13 +273,13 @@ template<UnsignedInt dimensions> 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<Dimensions, Int> size() const { return _size; }
/**

2
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()
*/

12
src/Magnum/Image.h

@ -172,8 +172,8 @@ template<UnsignedInt dimensions> 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<dimensions, Int>&, Containers::Array<char>&&),
@ -200,7 +200,7 @@ template<UnsignedInt dimensions> 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<UnsignedInt dimensions> 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<dimensions, Int> size() const { return _size; }
/**
@ -632,7 +632,7 @@ template<UnsignedInt dimensions> class CompressedImage {
*/
CompressedPixelFormat format() const { return _format; }
/** @brief Image size */
/** @brief Image size in pixels */
VectorTypeFor<dimensions, Int> size() const { return _size; }
/**

14
src/Magnum/ImageView.h

@ -214,8 +214,8 @@ template<UnsignedInt dimensions, class T> 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<dimensions, Int>&, Containers::ArrayView<ErasedType>),
@ -242,8 +242,8 @@ template<UnsignedInt dimensions, class T> 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<dimensions, Int>&),
* where pixel size is calculated automatically using
@ -403,13 +403,13 @@ template<UnsignedInt dimensions, class T> 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<dimensions, Int> size() const { return _size; }
/**
@ -775,7 +775,7 @@ template<UnsignedInt dimensions, class T> class CompressedImageView {
*/
CompressedPixelFormat format() const { return _format; }
/** @brief Image size */
/** @brief Image size in pixels */
constexpr VectorTypeFor<dimensions, Int> size() const { return _size; }
/**

2
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()

12
src/Magnum/Trade/ImageData.h

@ -179,8 +179,8 @@ template<UnsignedInt dimensions> 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<UnsignedInt dimensions> 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<UnsignedInt dimensions> 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<dimensions, Int> size() const { return _size; }
/**

Loading…
Cancel
Save