MTek-GDL 0.100.4-muffintrap
Loading...
Searching...
No Matches
mgdl-draw2d.h
Go to the documentation of this file.
1#pragma once
2
3#include <mgdl/mgdl-color.h>
4#include <mgdl/mgdl-types.h>
5
15#ifdef __cplusplus
16extern "C"
17{
18#endif
19
28Rect Rect_Create(short x, short y, short w, short h);
29
36Rect Rect_CreateV2f(vec2 position, vec2 size);
37
44void Draw2D_OrigoTo(short x, short y);
45void Draw2D_OrigoToV2f(vec2 origo);
46
47
59void Draw2D_RectLines(short x, short y, short x2, short y2, Color4f* color);
60void Draw2D_RectLinesWH(short x, short y, short w, short h, Color4f* color);
61void Draw2D_RectLinesRec(Rect rect, Color4f* color);
62
72void Draw2D_Rect(short x, short y, short x2, short y2, Color4f* color);
73void Draw2D_RectR(Rect rect, Color4f* color);
74
90void Draw2D_Quad(short xtl, short ytl, short xbl, short ybl, short xbr, short ybr, short xtr, short ytr, Color4f* color);
91void Draw2D_QuadV2f(vec2 tl, vec2 bl, vec2 br, vec2 tr, Color4f* color);
92
102void Draw2D_Line( short int x, short int y, short int x2, short int y2, Color4f* color );
103
111void Draw2D_LineV2f(vec2 start, vec2 end, Color4f* color );
112
121void Draw2D_Text(short x, short y, const char* text, Color4f* color);
122
130void Draw2D_TextV2f(vec2 position, const char* text, Color4f* color);
131
132
133#ifdef __cplusplus
134}
135#endif
Color struct and functions.
void Draw2D_Text(short x, short y, const char *text, Color4f *color)
Draws text using the default font.
Definition mgdl-draw2d.cpp:130
void Draw2D_Quad(short xtl, short ytl, short xbl, short ybl, short xbr, short ybr, short xtr, short ytr, Color4f *color)
Draws a filled quad with freely positioned corners.
Definition mgdl-draw2d.cpp:84
Rect Rect_CreateV2f(vec2 position, vec2 size)
Creates a rectangle struct.
Definition mgdl-draw2d.cpp:14
void Draw2D_Rect(short x, short y, short x2, short y2, Color4f *color)
Draws a filled box.
Definition mgdl-draw2d.cpp:59
void Draw2D_RectLines(short x, short y, short x2, short y2, Color4f *color)
Draws a box border.
Definition mgdl-draw2d.cpp:29
void Draw2D_OrigoTo(short x, short y)
Translates the origo to given point.
Definition mgdl-draw2d.cpp:19
void Draw2D_LineV2f(vec2 start, vec2 end, Color4f *color)
Draws a line.
Definition mgdl-draw2d.cpp:124
Rect Rect_Create(short x, short y, short w, short h)
Creates a rectangle struct.
Definition mgdl-draw2d.cpp:9
void Draw2D_Line(short int x, short int y, short int x2, short int y2, Color4f *color)
Draws a line.
void Draw2D_TextV2f(vec2 position, const char *text, Color4f *color)
Draws text using the default font.
Definition mgdl-draw2d.cpp:136
Library types, macros, defines and enums header.
Definition mgdl-color.h:54
Definition mgdl-types.h:201