From 0c391fdbce5a079cf03e483eb6174dd47806163d Mon Sep 17 00:00:00 2001 From: chai Date: Wed, 7 Aug 2019 21:08:47 +0800 Subject: *misc --- Source/Asura.Editor/Graphics/Drawer.h | 40 +++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 Source/Asura.Editor/Graphics/Drawer.h (limited to 'Source/Asura.Editor/Graphics/Drawer.h') diff --git a/Source/Asura.Editor/Graphics/Drawer.h b/Source/Asura.Editor/Graphics/Drawer.h new file mode 100644 index 0000000..4adfa3f --- /dev/null +++ b/Source/Asura.Editor/Graphics/Drawer.h @@ -0,0 +1,40 @@ +#ifndef _ASURA_EDITOR_PAINTER_H_ +#define _ASURA_EDITOR_PAINTER_H_ + +#include +#include +#include + +namespace AsuraEditor +{ + namespace Graphics + { + + /// + /// 基于AsuraEngine的渲染部分的绘画类,用于绘制控件和文字。之所以不直接用引擎部分的渲染, + /// 是因为引擎的渲染在framework中实现,有更高级的抽象,而控件的渲染不需要复杂的pass。在 + /// 编辑器下,引擎的渲染和编辑器的渲染可以混编。 + /// + class Drawer + : public AsuraEngine::Singleton + , public AEScripting::Portable + { + public: + + void DrawLine(int x1, int y1, int x2, int y2); + void DrawImage(AEGraphics::Image* img, int x, int y, float sx, float sy, float r, int ox, int oy); + void DrawTexts(); + void DrawCircle(int x, int y, float d); + void DrawPoint(int x, int y); + void DrawPolyline(); + + private: + + LUAX_DECL_SINGLETON(Drawer); + + }; + + } +} + +#endif \ No newline at end of file -- cgit v1.1-26-g67d0