not-fl3 / macroquad

Cross-platform game engine in Rust.
Apache License 2.0
3.04k stars 297 forks source link

Lack of ability to draw circles and arcs #735

Closed KurlykovDanila closed 2 weeks ago

KurlykovDanila commented 2 weeks ago

At the moment there is a function(draw_poly_lines(x, y, sides, radius, rotation, thickness, color)) for drawing a closed curve, but it cannot be used to draw a circle, much less an arc of a circle. How it works now:

draw_poly_lines(
            screen_width() / 2.,
            screen_height() / 2.,
            20,
            200.,
            0.,
            100.,
            WHITE,
        );

image Desired result: image Suggested Solution Add a function to draw an arc image I have a ready-made solution that adds a function for drawing an arc. I'm waiting for the author's approval to add it to the standard macroquad api

KurlykovDanila commented 2 weeks ago

PR #736