pub enum DisplayItem {
Op(PaintOp),
PushClip(Rect),
PopClip,
PushOffset(Point),
PopOffset,
}Expand description
One entry in a DisplayList.
Variants§
Op(PaintOp)
A drawing operation.
PushClip(Rect)
Clips every following item to this rectangle until the matching
DisplayItem::PopClip.
PopClip
Restores the clip that was active before the matching
DisplayItem::PushClip.
PushOffset(Point)
Draws every following item translated by this offset until the
matching DisplayItem::PopOffset.
Offsets nest with clips and with each other: an item’s window position is its own position plus the sum of the open offsets. Clips pushed inside an offset scope hold their rectangle in the scope’s coordinates, so translating the scope moves the clip with the items it cuts.
PopOffset
Restores the offset that was active before the matching
DisplayItem::PushOffset.
Trait Implementations§
Source§impl Clone for DisplayItem
impl Clone for DisplayItem
Source§impl Debug for DisplayItem
impl Debug for DisplayItem
Source§impl PartialEq for DisplayItem
impl PartialEq for DisplayItem
impl StructuralPartialEq for DisplayItem
Auto Trait Implementations§
impl !RefUnwindSafe for DisplayItem
impl !Send for DisplayItem
impl !Sync for DisplayItem
impl !UnwindSafe for DisplayItem
impl Forget for DisplayItem
impl Freeze for DisplayItem
impl Move for DisplayItem
impl Unpin for DisplayItem
impl UnsafeUnpin for DisplayItem
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