pub struct DrawList { /* private fields */ }Expand description
Zeichen-Sammlung mit Scissor-Stapel. Alles Landet in Batches — der Stapel ist wie bei GPU-Scissoring verschachtelt (Kinder clippen gegen den Eltern-Clip).
Implementations§
Source§impl DrawList
impl DrawList
pub fn new(clip: Rect) -> Self
pub fn cmds(&self) -> &[DrawCmd]
pub fn push_clip(&mut self, r: Rect)
pub fn pop_clip(&mut self)
Sourcepub fn stroke(&mut self, r: Rect, w: f32, color: Rgba)
pub fn stroke(&mut self, r: Rect, w: f32, color: Rgba)
Rand als vier dünne Rechtecke (eckig; gerundete Ränder später).
Sourcepub fn line(&mut self, x0: f32, y0: f32, x1: f32, y1: f32, w: f32, color: Rgba)
pub fn line(&mut self, x0: f32, y0: f32, x1: f32, y1: f32, w: f32, color: Rgba)
Horizontale oder vertikale Linie mit Dicke — auf das Pixelraster gerastert (Kanten ganzzahlig), damit CPU-Referenz und Hardware-Rasterizer nie um eine Zeile divergieren. Eine 1px-Linie bei y=28 trifft die Zeile 28.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for DrawList
impl RefUnwindSafe for DrawList
impl Send for DrawList
impl Sync for DrawList
impl Unpin for DrawList
impl UnsafeUnpin for DrawList
impl UnwindSafe for DrawList
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