#pragma once #include "../base/Color.h" #include "../base/Geometry.h" #include "Image_View.h" #include #include #include namespace renderive { class Image { public: Image(); Image(int width, int height); ~Image(); Image(const Image& other); Image(Image&& other) noexcept; Image& operator=(const Image& other); Image& operator=(Image&& other) noexcept; [[nodiscard]] int width() const; [[nodiscard]] int height() const; [[nodiscard]] Size size() const; [[nodiscard]] bool empty() const; [[nodiscard]] std::size_t byte_size() const; void clear(); void resize(int width, int height); void fill(Color color); Pixel* row(int y); const Pixel* row(int y) const; [[nodiscard]] Image_View view() const; struct Impl; std::unique_ptr impl_; friend class Canvas; }; } // namespace renderive