Skip to main content

basic_shapes/
basic_shapes.rs

1use macroquad::prelude::*;
2
3#[macroquad::main("BasicShapes")]
4async fn main() {
5    loop {
6        clear_background(LIGHTGRAY);
7
8        draw_line(40.0, 40.0, 100.0, 200.0, 15.0, BLUE);
9        draw_rectangle(screen_width() / 2.0 - 60.0, 100.0, 120.0, 60.0, GREEN);
10        draw_circle(screen_width() - 30.0, screen_height() - 30.0, 15.0, YELLOW);
11
12        draw_text("HELLO", 20.0, 20.0, 30.0, DARKGRAY);
13
14        next_frame().await
15    }
16}