pub struct ModelRect {
pub top: usize,
pub bot: usize,
pub left: usize,
pub right: usize,
}
Fields§
§top: usize
§bot: usize
§left: usize
§right: usize
Implementations§
Source§impl ModelRect
impl ModelRect
pub fn new(top: usize, bot: usize, left: usize, right: usize) -> ModelRect
pub fn point(x: usize, y: usize) -> ModelRect
fn in_horizontal(&self, other: &ModelRect) -> bool
fn in_vertical(&self, other: &ModelRect) -> bool
fn contains(&self, other: &ModelRect) -> bool
Sourcepub fn extend_by_items(&mut self, model: Option<&UiModel>)
pub fn extend_by_items(&mut self, model: Option<&UiModel>)
Extend rect to left and right to make changed Item rerendered
pub fn to_area_extend_ink( &self, model: Option<&UiModel>, cell_metrics: &CellMetrics, ) -> (i32, i32, i32, i32)
fn extend_left_right_area( &self, model: Option<&UiModel>, cell_metrics: &CellMetrics, ) -> (i32, i32)
fn extend_top_bottom_area( &self, model: Option<&UiModel>, cell_metrics: &CellMetrics, ) -> (i32, i32)
pub fn join(&mut self, rect: &ModelRect)
pub fn to_area(&self, cell_metrics: &CellMetrics) -> (i32, i32, i32, i32)
pub fn from_area( cell_metrics: &CellMetrics, x1: f64, y1: f64, x2: f64, y2: f64, ) -> ModelRect
Trait Implementations§
impl StructuralPartialEq for ModelRect
Auto Trait Implementations§
impl Freeze for ModelRect
impl RefUnwindSafe for ModelRect
impl Send for ModelRect
impl Sync for ModelRect
impl Unpin for ModelRect
impl UnwindSafe for ModelRect
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