Struct iced_native::renderer::Null
source · pub struct Null;
Expand description
A renderer that does nothing.
It can be useful if you are writing tests!
Implementations§
Trait Implementations§
source§impl Renderer for Null
impl Renderer for Null
source§fn with_layer(&mut self, _bounds: Rectangle, _f: impl FnOnce(&mut Self))
fn with_layer(&mut self, _bounds: Rectangle, _f: impl FnOnce(&mut Self))
Draws the primitives recorded in the given closure in a new layer. Read more
source§fn with_translation(&mut self, _translation: Vector, _f: impl FnOnce(&mut Self))
fn with_translation(&mut self, _translation: Vector, _f: impl FnOnce(&mut Self))
Applies a
translation
to the primitives recorded in the given closure.source§fn fill_quad(&mut self, _quad: Quad, _background: impl Into<Background>)
fn fill_quad(&mut self, _quad: Quad, _background: impl Into<Background>)
Fills a
Quad
with the provided Background
.source§impl Renderer for Null
impl Renderer for Null
source§const CHECKMARK_ICON: char = '0'
const CHECKMARK_ICON: char = '0'
The
char
representing a ✔ icon in the ICON_FONT
.source§const ARROW_DOWN_ICON: char = '0'
const ARROW_DOWN_ICON: char = '0'
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
.source§fn measure(
&self,
_content: &str,
_size: f32,
_font: Font,
_bounds: Size
) -> (f32, f32)
fn measure( &self, _content: &str, _size: f32, _font: Font, _bounds: Size ) -> (f32, f32)
Measures the text in the given bounds and returns the minimum boundaries
that can fit the contents.
source§fn hit_test(
&self,
_contents: &str,
_size: f32,
_font: Self::Font,
_bounds: Size,
_point: Point,
_nearest_only: bool
) -> Option<Hit>
fn hit_test( &self, _contents: &str, _size: f32, _font: Self::Font, _bounds: Size, _point: Point, _nearest_only: bool ) -> Option<Hit>
Tests whether the provided point is within the boundaries of text
laid out with the given parameters, returning information about
the nearest character. Read more
impl Copy for Null
Auto Trait Implementations§
impl RefUnwindSafe for Null
impl Send for Null
impl Sync for Null
impl Unpin for Null
impl UnwindSafe for Null
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> 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
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
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