Skip to main content

NullScenePainter

Struct NullScenePainter 

Source
pub struct NullScenePainter;

Implementations§

Source§

impl NullScenePainter

Source

pub fn new() -> Self

Trait Implementations§

Source§

impl Clone for NullScenePainter

Source§

fn clone(&self) -> NullScenePainter

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Copy for NullScenePainter

Source§

impl Default for NullScenePainter

Source§

fn default() -> NullScenePainter

Returns the “default value” for a type. Read more
Source§

impl PaintScene for NullScenePainter

Source§

fn reset(&mut self)

Removes all content from the scene
Source§

fn push_layer( &mut self, _blend: impl Into<BlendMode>, _alpha: f32, _transform: Affine, _clip: &impl Shape, _filter: Option<Arc<Filter>>, _backdrop_filter: Option<Arc<Filter>>, )

Pushes a new layer clipped by the specified shape and composed with previous layers using the specified blend mode. Every drawing command after this call will be clipped by the shape until the layer is popped. However, the transforms are not saved or modified by the layer stack.
Source§

fn push_clip_layer(&mut self, _transform: Affine, _clip: &impl Shape)

Pushes a new clip layer clipped by the specified shape. Every drawing command after this call will be clipped by the shape until the layer is popped. However, the transforms are not saved or modified by the layer stack.
Source§

fn pop_layer(&mut self)

Pops the current layer.
Source§

fn stroke<'a>( &mut self, _style: &Stroke, _transform: Affine, _brush: impl Into<PaintRef<'a>>, _brush_transform: Option<Affine>, _shape: &impl Shape, )

Strokes a shape using the specified style and brush.
Source§

fn fill<'a>( &mut self, _style: Fill, _transform: Affine, _brush: impl Into<PaintRef<'a>>, _brush_transform: Option<Affine>, _shape: &impl Shape, )

Fills a shape using the specified style and brush.
Source§

fn draw_glyphs<'a, 's: 'a>( &'s mut self, _font: &'a FontData, _font_size: f32, _hint: bool, _normalized_coords: &'a [NormalizedCoord], _embolden: Vec2, _style: impl Into<StyleRef<'a>>, _brush: impl Into<PaintRef<'a>>, _brush_alpha: f32, _transform: Affine, _glyph_transform: Option<Affine>, _glyphs: impl Iterator<Item = Glyph>, )

Draws a run of glyphs
Source§

fn draw_box_shadow( &mut self, _transform: Affine, _rect: Rect, _brush: Color, _radius: f64, _std_dev: f64, )

Draw a rounded rectangle blurred with a gaussian filter.
Source§

fn append_scene(&mut self, scene: Scene, scene_transform: Affine)

Append a recorded Scene Fragment to the current scene
Source§

fn draw_image(&mut self, image: ImageBrushRef<'_>, transform: Affine)

Utility method to draw an image at it’s natural size. For more advanced image drawing use the fill method
Source§

impl RenderContext for NullScenePainter

Source§

fn try_register_custom_resource( &mut self, resource: Box<dyn Any>, ) -> Result<ResourceId, RegisterResourceError>

Source§

fn unregister_resource(&mut self, resource_id: ResourceId)

Source§

fn renderer_specific_context(&self) -> Option<Box<dyn Any>>

Return a type-erased context type that is passed to custom widgets in order to enable them to render renderer-specific content

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. 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> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
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.
Source§

impl<T> WasmNotSend for T
where T: Send,

Source§

impl<T> WasmNotSendSync for T

Source§

impl<T> WasmNotSync for T
where T: Sync,