![]() |
Castor3D 0.17.0
Multiplatform 3D engine
|
#include <Image.hpp>
Public Member Functions | |
Construction/Destruction. | |
CU_API | Image (String const &name, Path const &path, Size const &size, PixelFormat format, ByteArray const &buffer, PixelFormat bufferFormat) |
CU_API | Image (String const &name, Path const &path, Size const &size, PixelFormat format=PixelFormat::eR8G8B8A8_UNORM, uint8_t const *buffer=nullptr, PixelFormat bufferFormat=PixelFormat::eR8G8B8A8_UNORM) |
CU_API | Image (String const &name, Path const &path, PxBufferBase const &buffer) |
CU_API | Image (String const &name, Path const &path, ImageLayout layout, PxBufferBaseUPtr buffer=nullptr) |
template<PixelFormat PFSrc, PixelFormat PFDst> | |
Image (String name, Path path, Size const &size, uint8_t const *buffer=nullptr) | |
Image (String const &name, Size const &size, PixelFormat format, uint8_t const *buffer, PixelFormat bufferFormat) | |
Image (String const &name, Size const &size, PixelFormat format, ByteArray const &buffer, PixelFormat bufferFormat) | |
Image (String const &name, PxBufferBase const &buffer) | |
Image (String const &name, ImageLayout layout, PxBufferBaseUPtr buffer) | |
virtual CU_API | ~Image () noexcept=default |
Copy/Move. | |
CU_API | Image (Image const &image) |
CU_API | Image (Image &&image) noexcept=default |
CU_API Image & | operator= (Image const &image) |
CU_API Image & | operator= (Image &&image) noexcept=default |
![]() | |
NamedBaseT (T name) noexcept | |
Constructor. | |
T const & | getName () const noexcept |
Retrieves the name. | |
void | rename (T name) noexcept |
Friends | |
class | Font |
Modification. | |
CU_API PxBufferBaseUPtr | updateLayerLayout (Size const &extent, PixelFormat format) |
CU_API Image & | resample (Size const &size) |
Resizes the image to the given resolution. | |
CU_API Image | getResampled (Size const &size) const |
Resizes the image to the given resolution. | |
CU_API Image & | fill (RgbColour const &colour) |
Fills all image pixels with the given colour. | |
CU_API Image & | fill (RgbaColour const &colour) |
Fills all image pixels with the given colour. | |
CU_API Image & | setPixel (uint32_t x, uint32_t y, uint8_t const *pixel, PixelFormat format) |
Fills the wanted pixel with the given buffer. | |
CU_API Image & | setPixel (uint32_t x, uint32_t y, RgbColour const &colour) |
sets the colour of the wanted pixel to the given one | |
CU_API Image & | setPixel (uint32_t x, uint32_t y, RgbaColour const &colour) |
sets the colour of the wanted pixel to the given one | |
template<PixelFormat PF> | |
Image & | setPixel (uint32_t x, uint32_t y, Pixel< PF > const &pixel) |
set the wanted pixel to the given pixel | |
CU_API Image & | invertX () |
CU_API Image & | invertY () |
CU_API Image & | invertZ () |
uint32_t | getLevels () const noexcept |
Size | getDimensions () const noexcept |
std::size_t | getSize (uint32_t level=0u) const noexcept |
uint32_t | getWidth () const noexcept |
uint32_t | getHeight () const noexcept |
Path | getPath () const noexcept |
ImageLayout::Buffer | getBuffer () |
ImageLayout::ConstBuffer | getBuffer () const |
ImageLayout::Buffer | getBuffer (uint32_t index) |
ImageLayout::ConstBuffer | getBuffer (uint32_t index) const |
ImageLayout::Buffer | getBuffer (uint32_t index, uint32_t level) |
ImageLayout::ConstBuffer | getBuffer (uint32_t index, uint32_t level) const |
bool | hasBuffer () const noexcept |
PxBufferBase const & | getPxBuffer () const noexcept |
PxBufferBase & | getPxBuffer () noexcept |
PxBufferBaseRPtr | getPixels () const noexcept |
ImageLayout const & | getLayout () const noexcept |
ImageLayout & | getLayout () noexcept |
PixelFormat | getPixelFormat () const noexcept |
void | initialise () const noexcept |
void | cleanup () const noexcept |
static CU_API PxBufferBaseUPtr | resample (Size const &size, PxBufferBaseUPtr buffer) |
Additional Inherited Members | |
![]() | |
T | m_name |
CU_API castor::Image::Image | ( | String const & | name, |
Path const & | path, | ||
Size const & | size, | ||
PixelFormat | format, | ||
ByteArray const & | buffer, | ||
PixelFormat | bufferFormat ) |
CU_API castor::Image::Image | ( | String const & | name, |
Path const & | path, | ||
Size const & | size, | ||
PixelFormat | format = PixelFormat::eR8G8B8A8_UNORM, | ||
uint8_t const * | buffer = nullptr, | ||
PixelFormat | bufferFormat = PixelFormat::eR8G8B8A8_UNORM ) |
CU_API castor::Image::Image | ( | String const & | name, |
Path const & | path, | ||
PxBufferBase const & | buffer ) |
CU_API castor::Image::Image | ( | String const & | name, |
Path const & | path, | ||
ImageLayout | layout, | ||
PxBufferBaseUPtr | buffer = nullptr ) |
|
inline |
References CU_CheckInvariants.
|
inline |
|
inline |
|
inline |
|
inline |
|
virtualdefaultnoexcept |
|
inlinenoexcept |
CU_API Image & castor::Image::fill | ( | RgbaColour const & | colour | ) |
Fills all image pixels with the given colour.
[in] | colour | The fill colour |
Fills all image pixels with the given colour.
[in] | colour | The fill colour |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
name Getters.
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
References CU_Require.
Referenced by castor3d::TextureSource::getBuffer(), castor3d::TextureSource::getBuffer(), and castor3d::TextureSource::hasBuffer().
|
inlinenoexcept |
References CU_Require.
Resizes the image to the given resolution.
[in] | size | The new resolution |
References resample().
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
Resizes the image to the given resolution.
[in] | size | The new resolution |
Referenced by getResampled().
|
static |
|
inline |
set the wanted pixel to the given pixel
[in] | x,y | The pixel coordinates |
[in] | pixel | The pixel |
References castor::convertPixel(), CU_CheckInvariants, CU_Require, and castor::getPixelFormat().
CU_API Image & castor::Image::setPixel | ( | uint32_t | x, |
uint32_t | y, | ||
RgbaColour const & | colour ) |
sets the colour of the wanted pixel to the given one
[in] | x,y | The pixel coordinates |
[in] | colour | The colour |
sets the colour of the wanted pixel to the given one
[in] | x,y | The pixel coordinates |
[in] | colour | The colour |
CU_API Image & castor::Image::setPixel | ( | uint32_t | x, |
uint32_t | y, | ||
uint8_t const * | pixel, | ||
PixelFormat | format ) |
Fills the wanted pixel with the given buffer.
[in] | x,y | The pixel coordinates |
[in] | pixel | The buffer |
[in] | format | The buffer's pixel format |
CU_API PxBufferBaseUPtr castor::Image::updateLayerLayout | ( | Size const & | extent, |
PixelFormat | format ) |
|
friend |