[−][src]Struct egui::PaintList
Each PaintCmd
is paired with a clip rectangle.
Implementations
impl PaintList
[src]
pub fn is_empty(&self) -> bool
[src]
pub fn add(&mut self, clip_rect: Rect, cmd: PaintCmd) -> PaintCmdIdx
[src]
Returns the index of the new command that can be used with PaintList::set
.
pub fn extend(&mut self, clip_rect: Rect, cmds: Vec<PaintCmd>)
[src]
pub fn set(&mut self, idx: PaintCmdIdx, clip_rect: Rect, cmd: PaintCmd)
[src]
Modify an existing command.
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 PaintCmd
using let idx = paint_list.add(cr, PaintCmd::Noop);
and then later setting it using paint_list.set(idx, cr, frame);
.
pub fn translate(&mut self, delta: Vec2)
[src]
Translate each paint-command and clip rectangle by this much, in-place
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for PaintList
[src]
impl Send for PaintList
[src]
impl Sync for PaintList
[src]
impl Unpin for PaintList
[src]
impl UnwindSafe for PaintList
[src]
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>,