pub struct Backend { /* private fields */ }
Implementations§
source§impl Backend
impl Backend
sourcepub fn new(device: &Device, settings: Settings, format: TextureFormat) -> Self
pub fn new(device: &Device, settings: Settings, format: TextureFormat) -> Self
Creates a new Backend
.
sourcepub fn present<T: AsRef<str>>(
&mut self,
device: &Device,
staging_belt: &mut StagingBelt,
encoder: &mut CommandEncoder,
frame: &TextureView,
primitives: &[Primitive],
viewport: &Viewport,
overlay_text: &[T]
)
pub fn present<T: AsRef<str>>( &mut self, device: &Device, staging_belt: &mut StagingBelt, encoder: &mut CommandEncoder, frame: &TextureView, primitives: &[Primitive], viewport: &Viewport, overlay_text: &[T] )
Draws the provided primitives in the given TextureView
.
The text provided as overlay will be rendered on top of the primitives. This is useful for rendering debug information.
Trait Implementations§
source§impl Backend for Backend
impl Backend for Backend
source§fn trim_measurements(&mut self)
fn trim_measurements(&mut self)
Trims the measurements cache. Read more
source§impl Image for Backend
impl Image for Backend
source§fn dimensions(&self, handle: &Handle) -> Size<u32>
fn dimensions(&self, handle: &Handle) -> Size<u32>
Returns the dimensions of the provided image.
source§impl Svg for Backend
impl Svg for Backend
source§fn viewport_dimensions(&self, handle: &Handle) -> Size<u32>
fn viewport_dimensions(&self, handle: &Handle) -> Size<u32>
Returns the viewport dimensions of the provided SVG.
source§impl Text for Backend
impl Text for Backend
source§const CHECKMARK_ICON: char = '\u{f00c}'
const CHECKMARK_ICON: char = '\u{f00c}'
The
char
representing a ✔ icon in the ICON_FONT
.source§const ARROW_DOWN_ICON: char = '\u{e800}'
const ARROW_DOWN_ICON: char = '\u{e800}'
The
char
representing a ▼ icon in the built-in ICON_FONT
.source§fn default_size(&self) -> f32
fn default_size(&self) -> f32
Returns the default size of text.
Auto Trait Implementations§
impl !RefUnwindSafe for Backend
impl !Send for Backend
impl !Sync for Backend
impl Unpin for Backend
impl !UnwindSafe for Backend
Blanket Implementations§
source§impl<S, D, Swp, Dwp, T> AdaptInto<D, Swp, Dwp, T> for Swhere
T: FloatComponent,
Swp: WhitePoint,
Dwp: WhitePoint,
D: AdaptFrom<S, Swp, Dwp, T>,
impl<S, D, Swp, Dwp, T> AdaptInto<D, Swp, Dwp, T> for Swhere T: FloatComponent, Swp: WhitePoint, Dwp: WhitePoint, D: AdaptFrom<S, Swp, Dwp, T>,
source§fn adapt_into_using<M>(self, method: M) -> Dwhere
M: TransformMatrix<Swp, Dwp, T>,
fn adapt_into_using<M>(self, method: M) -> Dwhere M: TransformMatrix<Swp, Dwp, T>,
Convert the source color to the destination color using the specified
method
source§fn adapt_into(self) -> D
fn adapt_into(self) -> D
Convert the source color to the destination color using the bradford
method by default
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T, U> IntoColor<U> for Twhere
U: FromColor<T>,
impl<T, U> IntoColor<U> for Twhere U: FromColor<T>,
source§fn into_color(self) -> U
fn into_color(self) -> U
Convert into T with values clamped to the color defined bounds Read more
source§impl<T, U> IntoColorUnclamped<U> for Twhere
U: FromColorUnclamped<T>,
impl<T, U> IntoColorUnclamped<U> for Twhere U: FromColorUnclamped<T>,
source§fn into_color_unclamped(self) -> U
fn into_color_unclamped(self) -> U
Convert into T. The resulting color might be invalid in its color space Read more
§impl<T> Pointable for T
impl<T> Pointable for T
source§impl<T, U> TryIntoColor<U> for Twhere
U: TryFromColor<T>,
impl<T, U> TryIntoColor<U> for Twhere U: TryFromColor<T>,
source§fn try_into_color(self) -> Result<U, OutOfBounds<U>>
fn try_into_color(self) -> Result<U, OutOfBounds<U>>
Convert into T, returning ok if the color is inside of its defined
range, otherwise an
OutOfBounds
error is returned which contains
the unclamped color. Read more