pub struct SceneCanvas<'a> { /* private fields */ }Expand description
Adapter que pinta sobre un &mut vello::Scene + &mut Typesetter.
Construir uno nuevo dentro del closure de llimphi_ui::View::paint_with.
Vida útil del borrow del scene iguala la del frame.
Implementations§
Source§impl<'a> SceneCanvas<'a>
impl<'a> SceneCanvas<'a>
pub fn new(scene: &'a mut Scene, typesetter: &'a mut Typesetter) -> Self
Trait Implementations§
Source§impl<'a> Canvas for SceneCanvas<'a>
impl<'a> Canvas for SceneCanvas<'a>
Source§fn push_clip(&mut self, _rect: Rect)
fn push_clip(&mut self, _rect: Rect)
Clip subsiguiente al rect dado. Stack-discipline:
push_clip + draw + pop_clip.fn pop_clip(&mut self)
Source§fn stroke_rect(&mut self, rect: Rect, stroke: StrokeStyle)
fn stroke_rect(&mut self, rect: Rect, stroke: StrokeStyle)
Rectángulo sólo stroke (sin fill).
Source§fn stroke_line(&mut self, a: Point, b: Point, stroke: StrokeStyle)
fn stroke_line(&mut self, a: Point, b: Point, stroke: StrokeStyle)
Línea de a→b.
Source§fn stroke_polyline(&mut self, coords: &[f32], stroke: StrokeStyle)
fn stroke_polyline(&mut self, coords: &[f32], stroke: StrokeStyle)
Polilínea sobre coords interleaved
[x0,y0,x1,y1,…].
El backend la rendea como un solo draw call cuando puede.Source§fn fill_triangle_strip(&mut self, coords: &[f32], colors: &[Color])
fn fill_triangle_strip(&mut self, coords: &[f32], colors: &[Color])
Triangle strip rellenado, con un color por vértice
(longitudes deben coincidir:
coords.len()/2 == colors.len()).
Es lo que usa el phosphor trail y los ribbons Sankey.Auto Trait Implementations§
impl<'a> !RefUnwindSafe for SceneCanvas<'a>
impl<'a> !UnwindSafe for SceneCanvas<'a>
impl<'a> Freeze for SceneCanvas<'a>
impl<'a> Send for SceneCanvas<'a>
impl<'a> Sync for SceneCanvas<'a>
impl<'a> Unpin for SceneCanvas<'a>
impl<'a> UnsafeUnpin for SceneCanvas<'a>
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.