NoRenderer

Struct NoRenderer 

Source
pub struct NoRenderer;
Expand description

A dummy renderer. This can be used for executing graphics commands without a graphical backend available.

Trait Implementations§

Source§

impl Renderer for NoRenderer

Source§

type Font = NoRendererFont

The font type used for rendering text. May be () if text rendering isn’t supported.
Source§

fn push(&mut self)

Pushes the current transform matrix and clip region onto a stack.
Source§

fn pop(&mut self)

Pops the topmost transform matrix and clip region off the stack and overwrites the current transform matrix with it.
Source§

fn translate(&mut self, _: Vector)

Translates the transform matrix by the given vector.
Source§

fn clip(&mut self, _: Rect)

Updates the clip region to the intersection of the current clip region and the provided rectangle. Initially, the clip region spans the whole window. This only allows for shrinking the clip region in size. The only way to increase its size is to use push() and pop(). Read more
Source§

fn fill(&mut self, _: Rect, _: Color, _: f32)

Draws a fill for the provided rectangle, with the given color and corner radius.
Source§

fn outline(&mut self, _: Rect, _: Color, _: f32, _: f32)

Draws an outline for the provided rectangle, with the given color, corner radius, and thickness.
Source§

fn line(&mut self, _: Point, _: Point, _: Color, _: LineCap, _: f32)

Draws a line from point A to point B, with the given color, cap type, and thickness.
Source§

fn text( &mut self, _: Rect, _: &Self::Font, _: &str, _: Color, _: Alignment, ) -> f32

Draws text aligned inside of the provided rectangle, with the given color. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.