ptk/examples/amogus.c

22 lines
964 B
C
Raw Normal View History

// Copyright (jacekpoz 2024). Licensed under the EUPL-1.2 or later.
#include <stdlib.h>
#include <ptk.h>
int main(void) {
if (!ptk_init(800, 600, "amogus", (PtkVersion){ .major = 0, .minor = 1, .patch = 0 })) {
return EXIT_FAILURE;
}
2024-08-13 18:59:52 +02:00
const PtkRGB red = { .r = 1.0f, .g = 0.0f, .b = 0.0f };
return ptk_run(PTK_BOX(
2024-08-13 01:18:10 +02:00
ptk_rect((PtkPos){ .x = 250.0f, .y = 200.0f }, (PtkSize){ .w = 300.0f, .h = 200.0f }, red),
ptk_rect((PtkPos){ .x = 250.0f, .y = 400.0f }, (PtkSize){ .w = 100.0f, .h = 100.0f }, red),
ptk_rect((PtkPos){ .x = 450.0f, .y = 400.0f }, (PtkSize){ .w = 100.0f, .h = 100.0f }, red),
ptk_circle((PtkPos){ .x = 400.0f, .y = 200.0f }, 150.0f, red),
ptk_rect((PtkPos){ .x = 200.0f, .y = 200.0f }, (PtkSize){ .w = 50.0f, .h = 125.0f }, red),
2024-08-13 18:59:52 +02:00
ptk_ellipse((PtkPos){ .x = 500.0f, .y = 200.0f }, (PtkSize){ .w = 100.0f, .h = 50.0f }, (PtkRGB){ .r = 1.0f, .g = 1.0f, .b = 1.0f }),
));
}