还是一堆bug的状态

This commit is contained in:
2026-08-01 20:09:45 +08:00
parent 0df7beda49
commit 8fb9683182
294 changed files with 13678 additions and 10864 deletions
+33
View File
@@ -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