pub struct UiView { /* private fields */ }Expand description
The scale and the clip of the UI’s sprites and texts:
UiList::set_view sets the view of those pushed after it.
Implementations§
Source§impl UiView
impl UiView
Sourcepub fn new(scale: UiScale) -> Self
pub fn new(scale: UiScale) -> Self
A view at scale, cut only to its space’s edges
(UiSpace::rect). Its scale is the one drawn: Pixel(0) is
Pixel(1), and a free scale is held as UiScale::Free says.
Sourcepub fn clipped(self, rect: Rect) -> Self
pub fn clipped(self, rect: Rect) -> Self
This view cut to rect too, in its UI units: its clip becomes the
part of rect inside the clip it had, so that a clip inside a clip
(a scrolled list in a window) is cut by both. A rect that does
not overlap the clip, has no area, or has an edge that is NaN cuts
everything: nothing in the view is drawn. Its edges may be
infinite.
Trait Implementations§
impl Copy for UiView
impl StructuralPartialEq for UiView
Auto Trait Implementations§
impl Forget for UiView
impl Freeze for UiView
impl Move for UiView
impl RefUnwindSafe for UiView
impl Send for UiView
impl Sync for UiView
impl Unpin for UiView
impl UnsafeUnpin for UiView
impl UnwindSafe for UiView
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