Browse Source

Document why Image*::size() is returning a const&.

pull/659/head
Vladimír Vondruš 1 year ago
parent
commit
e553cb973c
  1. 6
      src/Magnum/Image.h
  2. 6
      src/Magnum/ImageView.h
  3. 3
      src/Magnum/Trade/ImageData.h

6
src/Magnum/Image.h

@ -405,6 +405,9 @@ template<UnsignedInt dimensions> class Image {
UnsignedInt pixelSize() const { return _pixelSize; }
/** @brief Image size in pixels */
/* 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 */
const VectorTypeFor<dimensions, Int>& size() const { return _size; }
/**
@ -661,6 +664,9 @@ template<UnsignedInt dimensions> class CompressedImage {
CompressedPixelFormat format() const { return _format; }
/** @brief Image size in pixels */
/* 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 */
const VectorTypeFor<dimensions, Int>& size() const { return _size; }
/**

6
src/Magnum/ImageView.h

@ -452,6 +452,9 @@ template<UnsignedInt dimensions, class T> class ImageView {
UnsignedInt pixelSize() const { return _pixelSize; }
/** @brief Image size in pixels */
/* 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 */
const VectorTypeFor<dimensions, Int>& size() const { return _size; }
/**
@ -837,6 +840,9 @@ template<UnsignedInt dimensions, class T> class CompressedImageView {
CompressedPixelFormat format() const { return _format; }
/** @brief Image size in pixels */
/* 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 */
const VectorTypeFor<dimensions, Int>& size() const { return _size; }
/**

3
src/Magnum/Trade/ImageData.h

@ -757,6 +757,9 @@ template<UnsignedInt dimensions> class ImageData {
UnsignedInt pixelSize() const;
/** @brief Image size in pixels */
/* 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 */
const VectorTypeFor<dimensions, Int>& size() const { return _size; }
/**

Loading…
Cancel
Save