From 1480c9445100075c9e1a894eb07c0ef727b509a1 Mon Sep 17 00:00:00 2001 From: chai Date: Mon, 27 Aug 2018 07:55:00 +0800 Subject: *update --- src/libjin/Graphics/Shapes.h | 43 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 src/libjin/Graphics/Shapes.h (limited to 'src/libjin/Graphics/Shapes.h') diff --git a/src/libjin/Graphics/Shapes.h b/src/libjin/Graphics/Shapes.h new file mode 100644 index 0000000..742345e --- /dev/null +++ b/src/libjin/Graphics/Shapes.h @@ -0,0 +1,43 @@ +#ifndef __JIN_GRAPHICS_SHAPES_H +#define __JIN_GRAPHICS_SHAPES_H +#include "../modules.h" +#if JIN_MODULES_RENDER + +#include "color.h" +#include "canvas.h" +#include "texture.h" + +namespace jin +{ +namespace graphics +{ + + typedef enum { + NONE = 0, + FILL , + LINE + }RENDER_MODE; + + /** + * TODO: + * drawPixels(int n, points) + */ + extern void line(int x1, int y1, int x2, int y2); + + extern void rect(RENDER_MODE mode, int x, int y, int w, int h); + + extern void triangle(RENDER_MODE mode, int x1, int y1, int x2, int y2, int x3, int y3); + + extern void circle(RENDER_MODE mode, int x, int y, int r); + + extern void point(int x, int y); + + extern void points(int n, GLshort* p, GLubyte* c); + + extern void polygon(RENDER_MODE mode, float* p, int count); + +} +} + +#endif // JIN_MODULES_RENDER +#endif // __JIN_GEOMETRY_H \ No newline at end of file -- cgit v1.1-26-g67d0