还是一堆bug的状态
This commit is contained in:
@@ -0,0 +1,33 @@
|
||||
#pragma once
|
||||
#include "../base/Color.h"
|
||||
#include "../base/Geometry.h"
|
||||
#include "Image_View.h"
|
||||
#include <cstddef>
|
||||
#include <cstdint>
|
||||
#include <memory>
|
||||
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 size_bytes() 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> impl_;
|
||||
friend class Canvas;
|
||||
};
|
||||
} // namespace renderive
|
||||
Reference in New Issue
Block a user