-
Notifications
You must be signed in to change notification settings - Fork 0
/
Canvas.hpp
39 lines (24 loc) · 931 Bytes
/
Canvas.hpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#pragma once
#ifndef __CANVAS_HPP__
#define __CANVAS_HPP__
#include "Common.hpp"
#include "Color.hpp"
#include "String.hpp"
#include "Referenced.hpp"
#include "Font.hpp"
#include "RenderScene.hpp"
#include "Material.hpp"
class Canvas : public Referenced {
SharedPtr<RenderScene> renderScene;
public:
Canvas(RenderScene* renderScene_ ):renderScene(renderScene_) {}
//void setScene( RenderScene*) {}
virtual void setClipRect(int x1, int y1, int x2, int y2) {}
virtual void drawLine(int x1, int y1, int x2, int y2, const Color& color = Color::WHITE) {}
virtual void drawRectangle( int x1, int y1, int x2, int y2, const Color& color = Color::WHITE ) {}
virtual void drawText(int x1, int y1, const String&, const Color& color = Color::WHITE, Font* font = NULL) {}
virtual void setDefaultFont( Font* ) {}
virtual void flush() {}
};
Canvas* CreateCanvas(RenderScene*);
#endif