pub struct GpuSceneCanvas<'a, 'b> { /* private fields */ }Expand description
Adapter que pinta primitivos de Canvas sobre un GpuBatch. El
batch lo construye y flushea la app dentro del gpu_paint_with;
GpuSceneCanvas vive sólo durante las calls del painter.
Implementations§
Trait Implementations§
Source§impl<'a, 'b> Canvas for GpuSceneCanvas<'a, 'b>
impl<'a, 'b> Canvas for GpuSceneCanvas<'a, 'b>
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, 'b> !RefUnwindSafe for GpuSceneCanvas<'a, 'b>
impl<'a, 'b> !UnwindSafe for GpuSceneCanvas<'a, 'b>
impl<'a, 'b> Freeze for GpuSceneCanvas<'a, 'b>
impl<'a, 'b> Send for GpuSceneCanvas<'a, 'b>
impl<'a, 'b> Sync for GpuSceneCanvas<'a, 'b>
impl<'a, 'b> Unpin for GpuSceneCanvas<'a, 'b>
impl<'a, 'b> UnsafeUnpin for GpuSceneCanvas<'a, 'b>
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.