Nilirad / bevy_prototype_lyon

Draw 2D shapes in Bevy
Apache License 2.0
702 stars 87 forks source link

draw rect from uper left to bottom right , instand of from center+radius #143

Closed pyweeker closed 2 years ago

pyweeker commented 2 years ago

Hello, how to draw rect from x1y1 to x2y2 , i'd like to draw this here :
https://github.com/jonchisko/bevy_dragselect_example

riverfr0zen commented 2 years ago

Something like

    let myrect = shapes::Rectangle {
        extents: Vec2::new(100.0, 200.0),
        origin: RectangleOrigin::TopLeft,
        ..Default::default()
    };
pyweeker commented 2 years ago

thank you !