diff options
author | Aryadev Chavali <aryadev@aryadevchavali.com> | 2024-07-26 21:08:59 +0100 |
---|---|---|
committer | Aryadev Chavali <aryadev@aryadevchavali.com> | 2024-07-26 21:08:59 +0100 |
commit | 0eaa851114ae2d2a0bbd26e8905dcacf6e6a9ce6 (patch) | |
tree | f14a5146a2c895dbbf40b3aebc6a6669acc04cf5 | |
parent | 2ddf2d0b48d42dae93545e6c6c6540b672caba7b (diff) | |
download | cw_tree-0eaa851114ae2d2a0bbd26e8905dcacf6e6a9ce6.tar.gz cw_tree-0eaa851114ae2d2a0bbd26e8905dcacf6e6a9ce6.tar.bz2 cw_tree-0eaa851114ae2d2a0bbd26e8905dcacf6e6a9ce6.zip |
Increase font size, other small changes
-rw-r--r-- | src/main.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/main.cpp b/src/main.cpp index da7cca4..5f8bc3c 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -27,7 +27,7 @@ #define WIDTH 1024 #define HEIGHT 1024 -#define FONT_SIZE 10 +#define FONT_SIZE 20 #define CIRCLE_SIZE 2 #define LINE_TOP (7 * HEIGHT / 16) #define LINE_BOTTOM (9 * HEIGHT / 16) @@ -106,18 +106,20 @@ void draw_number_line(const NodeAllocator &allocator) int main(void) { + // Setup CW tree NodeAllocator allocator{0}; std::queue<word_t> to_iterate; Fraction best_frac{1, 2}; word_t root = allocator.alloc({best_frac}); to_iterate.push(root); + // Setup meta text (counter, iterations, etc) word_t count = 1, prev_count = 0; std::stringstream format_stream; std::string format_str; word_t format_str_width = 0; - InitWindow(WIDTH, HEIGHT, "Calkin-Wilf Trees"); + InitWindow(WIDTH, HEIGHT, "Calkin-Wilf Tree"); while (!WindowShouldClose()) { if (IsKeyPressed(KEY_SPACE)) @@ -139,7 +141,7 @@ int main(void) BeginDrawing(); draw_number_line(allocator); DrawText(format_str.c_str(), WIDTH / 2 - format_str_width / 2, - LINE_TOP - HEIGHT / 8, FONT_SIZE * 2, WHITE); + LINE_TOP - HEIGHT / 4, FONT_SIZE * 2, WHITE); EndDrawing(); } CloseWindow(); |