#include "core/gooey_backend_internal.h"
#include "core/gooey_common.h"
Go to the source code of this file.
|
GooeyCanvas * | GooeyCanvas_Add (GooeyWindow *win, int x, int y, int width, int height) |
| Adds a canvas to the window.
|
|
void | GooeyCanvas_DrawRectangle (GooeyCanvas *canvas, int x, int y, int width, int height, unsigned long color_hex, bool is_filled) |
| Draws a rectangle onto the user-defined canvas.
|
|
void | GooeyCanvas_DrawLine (GooeyCanvas *canvas, int x1, int y1, int x2, int y2, unsigned long color_hex) |
| Draws a line onto the user-defined canvas.
|
|
void | GooeyCanvas_DrawArc (GooeyCanvas *canvas, int x_center, int y_center, int width, int height, int angle1, int angle2) |
| Draws an arc onto the user-defined canvas.
|
|
void | GooeyCanvas_SetForeground (GooeyCanvas *canvas, unsigned long color_hex) |
| Sets foreground of the user-defined canvas.
|
|
void | GooeyCanvas_Draw (GooeyWindow *window) |
|
◆ GooeyCanvas_Add()
GooeyCanvas * GooeyCanvas_Add |
( |
GooeyWindow * |
win, |
|
|
int |
x, |
|
|
int |
y, |
|
|
int |
width, |
|
|
int |
height |
|
) |
| |
Adds a canvas to the window.
- Parameters
-
win | The window to add the canvas to. |
x | The x-coordinate of the canvas' position. |
y | The y-coordinate of the canvas' position. |
width | The width of the canvas. |
height | The height of the canvas. |
- Returns
- A new GooeyCanvas object.
◆ GooeyCanvas_Draw()
void GooeyCanvas_Draw |
( |
GooeyWindow * |
window | ) |
|
◆ GooeyCanvas_DrawArc()
void GooeyCanvas_DrawArc |
( |
GooeyCanvas * |
canvas, |
|
|
int |
x_center, |
|
|
int |
y_center, |
|
|
int |
width, |
|
|
int |
height, |
|
|
int |
angle1, |
|
|
int |
angle2 |
|
) |
| |
Draws an arc onto the user-defined canvas.
- Parameters
-
canvas | The user-defined canvas. |
x_center | The x-coordinate of the arc. |
y_center | The y-coordinate of the arc. |
width | The width of the arc. |
height | The height of the arc. |
angle1 | starting angle of the arc. |
angle2 | end angle of the arc. |
◆ GooeyCanvas_DrawLine()
void GooeyCanvas_DrawLine |
( |
GooeyCanvas * |
canvas, |
|
|
int |
x1, |
|
|
int |
y1, |
|
|
int |
x2, |
|
|
int |
y2, |
|
|
unsigned long |
color_hex |
|
) |
| |
Draws a line onto the user-defined canvas.
- Parameters
-
canvas | The user-defined canvas. |
x1 | The x-coordinate of the origin point of the line. |
y1 | The y-coordinate of the origin point of the line. |
x2 | The x-coordinate of the last point of the line. |
y2 | The y-coordinate of the last point of the line. |
color_hex | The color of the line in hexadecimal. |
◆ GooeyCanvas_DrawRectangle()
void GooeyCanvas_DrawRectangle |
( |
GooeyCanvas * |
canvas, |
|
|
int |
x, |
|
|
int |
y, |
|
|
int |
width, |
|
|
int |
height, |
|
|
unsigned long |
color_hex, |
|
|
bool |
is_filled |
|
) |
| |
Draws a rectangle onto the user-defined canvas.
- Parameters
-
canvas | The user-defined canvas. |
x | The x-coordinate of the rectangle. |
y | The y-coordinate of the rectangle. |
width | The width of the rectangle. |
height | The height of the rectangle. |
color_hex | The color of the rectangle in hexadecimal. |
is_filled | If true, the rectangle is filled with a solid color. If false it is hollow. |
◆ GooeyCanvas_SetForeground()
void GooeyCanvas_SetForeground |
( |
GooeyCanvas * |
canvas, |
|
|
unsigned long |
color_hex |
|
) |
| |
Sets foreground of the user-defined canvas.
- Parameters
-
canvas | The user-defined canvas. |
color_hex | The foreground color in hexadecimal. |