Struct egui::layers::PaintList [−][src]
A list of Shapes paired with a clip rectangle.
Implementations
impl PaintList[src]
pub fn is_empty(&self) -> bool[src]
pub fn add(&mut self, clip_rect: Rect, shape: Shape) -> ShapeIdx[src]
Returns the index of the new Shape that can be used with PaintList::set.
pub fn extend(&mut self, clip_rect: Rect, shapes: Vec<Shape>)[src]
pub fn set(&mut self, idx: ShapeIdx, clip_rect: Rect, shape: Shape)[src]
Modify an existing Shape.
Sometimes you want to paint a frame behind some contents, but don’t know how large the frame needs to be
until the contents have been added, and therefor also painted to the PaintList.
The solution is to allocate a Shape using let idx = paint_list.add(cr, Shape::Noop);
and then later setting it using paint_list.set(idx, cr, frame);.
pub fn translate(&mut self, delta: Vec2)[src]
Translate each Shape and clip rectangle by this much, in-place
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for PaintList
impl Send for PaintList
impl Sync for PaintList
impl Unpin for PaintList
impl UnwindSafe for PaintList
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T[src]
impl<T> From<T> for T[src]
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone, [src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T[src]
pub fn clone_into(&self, target: &mut T)[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>, [src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,