[][src]Struct egui::PaintList

pub struct 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

impl Clone for PaintList[src]

impl Default for PaintList[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.