32 Bitmap(std::uint32_t width, std::uint32_t height,
const std::vector<std::uint8_t>& data);
52 std::vector<std::uint8_t>
copyData()
const;
58 const std::vector<std::uint8_t>&
getDataRef()
const;
The Bitmap class is a helper class for working with bitmap data.
Definition: bitmap.h:16
std::uint32_t getHeight() const
getHeight Gets the height of the bitmap.
Definition: bitmap.cpp:25
std::vector< std::uint8_t > m_data
The bitmap data.
Definition: bitmap.h:85
Bitmap & operator=(const geometrize::Bitmap &)=default
void fill(geometrize::rgba color)
fill Fills the bitmap with the given color.
Definition: bitmap.cpp:55
std::uint32_t m_height
The height of the bitmap.
Definition: bitmap.h:84
const std::vector< std::uint8_t > & getDataRef() const
getDataRef Gets a reference to the raw bitmap data.
Definition: bitmap.cpp:35
std::vector< std::uint8_t > copyData() const
copyData Gets a copy of the raw bitmap data.
Definition: bitmap.cpp:30
std::uint32_t m_width
The width of the bitmap.
Definition: bitmap.h:83
std::uint32_t getWidth() const
getWidth Gets the width of the bitmap.
Definition: bitmap.cpp:20
Bitmap(const geometrize::Bitmap &)=default
void setPixel(std::uint32_t x, std::uint32_t y, geometrize::rgba color)
setPixel Sets a pixel color value.
Definition: bitmap.cpp:46
Bitmap(std::uint32_t width, std::uint32_t height, geometrize::rgba color)
Bitmap Creates a new bitmap.
Definition: bitmap.cpp:10
geometrize::rgba getPixel(std::uint32_t x, std::uint32_t y) const
getPixel Gets a pixel color value.
Definition: bitmap.cpp:40
The rgba struct is a helper for manipulating RGBA8888 color data.
Definition: rgba.h:13