载入中...
搜索中...
未找到
Canvas.h
浏览该文件的文档.
1#pragma once
2
3#include "graphics/Color.h"
4#include "graphics/Drawable.h"
5
6#include <optional>
7
8namespace eve::image {
9class ImageData;
10}
11
12namespace eve::graphics {
13
14class Texture;
15
16class Canvas : public Drawable {
17public:
18 Canvas() {}
19 ~Canvas() override {}
20
21 virtual int getWidth() const = 0;
22 virtual int getHeight() const = 0;
23
25 virtual Texture *getTexture() = 0;
26
27 virtual void clear(std::optional<Color> color, std::optional<int> stencil,
28 std::optional<double> depth) = 0;
29
30 virtual Color getPixel(int x, int y) = 0;
31
34
35 virtual void draw(Canvas *C, const glm::mat4 &matrix) const = 0;
36};
37
38} // namespace eve::graphics
int y
Definition Grass.cpp:135
int x
Definition Grass.cpp:135
float depth
image::ImageData::Colorf color
virtual int getWidth() const =0
virtual Color getPixel(int x, int y)=0
virtual image::ImageData * newImageData()=0
virtual void draw(Canvas *C, const glm::mat4 &matrix) const =0
virtual void clear(std::optional< Color > color, std::optional< int > stencil, std::optional< double > depth)=0
virtual Texture * getTexture()=0
Sampleable color buffer; screen Canvas returns nullptr.
virtual int getHeight() const =0
~Canvas() override
Definition Canvas.h:19
Drawable base (textures, meshes, canvases).
Definition Drawable.h:17
GPU texture created via Graphics::newTexture. Owns GPU resources through an opaque backend handle.
Definition Texture.h:17
Represents raw pixel data.
Definition ImageData.h:26
卡牌游戏 UI 工具模块:工厂 + 脚本绑定入口。 功能参考 ycarowr/UiCard:扇形手牌布局、抽牌/洗牌、悬浮放大、拖拽到落牌区、 敌方手牌(背面/偷看)、费用不足置灰,以及可实时调节的布局...
Definition AnimTrail.h:6
glm::vec4 Color
RGBA color used by every graphics draw call. Lives inside eve::graphics so including a graphics heade...
Definition Color.h:13