Skip to main content

draw_rectangle_rotated

Function draw_rectangle_rotated 

Source
pub fn draw_rectangle_rotated(
    x: f32,
    y: f32,
    w: f32,
    h: f32,
    rotation: f32,
    color: Color,
)
Expand description

Draws a filled rectangle of size w x h centered at (x, y), rotated by rotation radians around that center.

ยงExamples

draw_rectangle_rotated(200.0, 200.0, 50.0, 80.0, std::f32::consts::FRAC_PI_4, GREEN);