pub struct DrawRect {
pub rect: Rect,
pub color: Color,
}Expand description
Filled axis-aligned rectangle draw primitive.
Coordinates are window-space logical pixels; color is linear RGBA.
§Examples
use ailloli_ui_core::{Color, Rect};
use ailloli_ui_runtime::scene::DrawRect;
let draw = DrawRect { rect: Rect::new(1.0, 2.0, 30.0, 10.0), color: Color::WHITE };
assert_eq!(draw.rect.w, 30.0);Fields§
§rect: RectFilled rectangle in logical pixels.
color: ColorLinear-RGBA fill color.
Trait Implementations§
impl Copy for DrawRect
impl StructuralPartialEq for DrawRect
Auto Trait Implementations§
impl Freeze for DrawRect
impl RefUnwindSafe for DrawRect
impl Send for DrawRect
impl Sync for DrawRect
impl Unpin for DrawRect
impl UnwindSafe for DrawRect
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<A> IntoClickAction<A> for Awhere
A: Clone + 'static,
impl<A> IntoClickAction<A> for Awhere
A: Clone + 'static,
Source§fn into_click_action(self) -> ClickAction<A>
fn into_click_action(self) -> ClickAction<A>
Implements the into_click_action helper used by this module.