cosmic::iced::advanced::graphics::geometry

Trait Renderer

source
pub trait Renderer: Renderer {
    type Geometry: Cached;
    type Frame: Backend<Geometry = Self::Geometry>;

    // Required methods
    fn new_frame(&self, size: Size) -> Self::Frame;
    fn draw_geometry(&mut self, geometry: Self::Geometry);
}
Expand description

A renderer capable of drawing some Self::Geometry.

Required Associated Types§

source

type Geometry: Cached

The kind of geometry this renderer can draw.

source

type Frame: Backend<Geometry = Self::Geometry>

The kind of Frame this renderer supports.

Required Methods§

source

fn new_frame(&self, size: Size) -> Self::Frame

Creates a new Self::Frame.

source

fn draw_geometry(&mut self, geometry: Self::Geometry)

Draws the given Self::Geometry.

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl Renderer for ()

source§

type Geometry = ()

source§

type Frame = ()

source§

fn new_frame(&self, _size: Size) -> <() as Renderer>::Frame

source§

fn draw_geometry(&mut self, _geometry: <() as Renderer>::Geometry)

source§

impl Renderer for Renderer

Implementors§

source§

impl<A, B> Renderer for cosmic::iced_widget::renderer::fallback::Renderer<A, B>
where A: Renderer, B: Renderer,

source§

type Geometry = Geometry<<A as Renderer>::Geometry, <B as Renderer>::Geometry>

source§

type Frame = Frame<<A as Renderer>::Frame, <B as Renderer>::Frame>