diff options
author | chai <chaifix@163.com> | 2018-08-27 07:55:00 +0800 |
---|---|---|
committer | chai <chaifix@163.com> | 2018-08-27 07:55:00 +0800 |
commit | 1480c9445100075c9e1a894eb07c0ef727b509a1 (patch) | |
tree | 1e694f40b9720a4ecaf6c67310629906f08d5a41 /src/libjin/Graphics/Shapes.h | |
parent | 4013357b9dd88c614906263cd5b0657b535bd9cb (diff) |
*update
Diffstat (limited to 'src/libjin/Graphics/Shapes.h')
-rw-r--r-- | src/libjin/Graphics/Shapes.h | 43 |
1 files changed, 43 insertions, 0 deletions
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 |