pub struct PaintCx<'a> { /* private fields */ }
Implementations§
source§impl<'a> PaintCx<'a>
impl<'a> PaintCx<'a>
pub fn save(&mut self)
pub fn restore(&mut self)
sourcepub fn paint_view(&mut self, view: &mut dyn View)
pub fn paint_view(&mut self, view: &mut dyn View)
The entry point for painting a view. You shouldn’t need to implement this yourself. Instead, implement View::paint
.
It handles the internal work before and after painting View::paint
implementations.
It is responsible for
- managing hidden status
- clipping
- painting computed styles like background color, border, font-styles, and z-index and handling painting requirements of drag and drop
pub fn layout(&self, node: Node) -> Option<Layout>
pub fn get_layout(&mut self, id: Id) -> Option<Layout>
sourcepub fn get_content_rect(&mut self, id: Id) -> Rect
pub fn get_content_rect(&mut self, id: Id) -> Rect
Returns the layout rect excluding borders, padding and position. This is relative to the view.
pub fn get_computed_style(&mut self, id: Id) -> &Style
sourcepub fn clear_clip(&mut self)
pub fn clear_clip(&mut self)
Remove clipping so the entire window can be rendered to.
pub fn offset(&mut self, offset: (f64, f64))
pub fn transform(&mut self, id: Id) -> Size
pub fn is_focused(&self, id: Id) -> bool
Methods from Deref<Target = Renderer>§
Trait Implementations§
Auto Trait Implementations§
impl<'a> !RefUnwindSafe for PaintCx<'a>
impl<'a> !Send for PaintCx<'a>
impl<'a> !Sync for PaintCx<'a>
impl<'a> Unpin for PaintCx<'a>
impl<'a> !UnwindSafe for PaintCx<'a>
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