Skip to main content

RenderList

Struct RenderList 

Source
pub struct RenderList { /* private fields */ }

Implementations§

Source§

impl RenderList

Source

pub fn new() -> Self

Source

pub fn clear(&mut self)

Source

pub fn push_opacity(&mut self, opacity: f32)

Source

pub fn pop_opacity(&mut self)

Source

pub fn opacity_depth(&self) -> usize

Source

pub fn truncate_opacity(&mut self, depth: usize)

Source

pub fn active_opacity(&self) -> f32

Source

pub fn opacity_spans(&self) -> &[OpacitySpan]

Source

pub fn has_opacity_groups(&self) -> bool

Source

pub fn opacity_at(&self, index: usize) -> f32

Returns the product of all group opacities covering index.

Includes groups that are still open, so it is usable while painting.

Source

pub fn opacity_plan(&self) -> Vec<OpacityNode>

Builds a nested plan of item segments and opacity groups.

Spans are emitted when a group closes, so they arrive inner-first. Sorting by range and stack depth reconstructs the original nesting.

Source

pub fn push_transform(&mut self, t: Transform)

Source

pub fn pop_transform(&mut self)

Source

pub fn transform_depth(&self) -> usize

Source

pub fn truncate_transforms(&mut self, depth: usize)

Source

pub fn active_transform(&self) -> Transform

Source

pub fn item_transform(&self, index: usize) -> Transform

Source

pub fn item_transforms(&self) -> &[Transform]

Source

pub fn push_clip(&mut self, rect: Rect)

Source

pub fn push_rounded_clip(&mut self, rect: Rect, radius: f32)

Source

pub fn clip_depth(&self) -> usize

Source

pub fn active_clip(&self) -> Option<Rect>

Source

pub fn active_clip_for(&self, t_item: Transform) -> Option<Rect>

Source

pub fn active_rounded_clip(&self) -> Option<RoundedClip>

Source

pub fn item_rounded_clip(&self, index: usize) -> Option<RoundedClip>

Source

pub fn truncate_clips(&mut self, depth: usize)

Source

pub fn pop_clip(&mut self)

Source

pub fn push_quad(&mut self, rect: Rect, color: Color, radius: f32)

Source

pub fn push_bordered_quad( &mut self, rect: Rect, color: Color, radius: f32, border_width: f32, border_color: Color, )

Source

pub fn push_shadow(&mut self, shadow: Shadow)

Source

pub fn push_text(&mut self, draw: TextDraw)

Source

pub fn push_image(&mut self, rect: Rect, uv: [f32; 4], source: ImageSource)

Source

pub fn push_image_sampled( &mut self, rect: Rect, uv: [f32; 4], source: ImageSource, sampling: ImageSampling, )

Source

pub fn push_waveform(&mut self, bars: &[Rect], color: Color)

Source

pub fn items(&self) -> &[RenderItem]

Source

pub fn push_gradient( &mut self, rect: Rect, radius: f32, kind: GradientKind, stops: GradientStops, )

Source

pub fn push_backdrop( &mut self, rect: Rect, radius: f32, blur: f32, dim: Color, noise: f32, mask: SpanMask, )

Source

pub fn backdrops(&self) -> &[BackdropSpan]

Source

pub fn has_backdrops(&self) -> bool

Source

pub fn push_filter_begin( &mut self, rect: Rect, radius: f32, blur: f32, mask: SpanMask, ) -> Option<usize>

Source

pub fn push_filter_end(&mut self, handle: usize)

Source

pub fn filter_spans(&self) -> &[FilterSpan]

Source

pub fn has_filters(&self) -> bool

Source

pub fn item_clips(&self) -> &[Option<RoundedClip>]

Source

pub fn quads(&self) -> impl Iterator<Item = &Quad>

Source

pub fn images(&self) -> impl Iterator<Item = &ImageDraw>

Source

pub fn shadows(&self) -> impl Iterator<Item = &Shadow>

Source

pub fn waveforms(&self) -> impl Iterator<Item = &WaveformDraw>

Source

pub fn gradients(&self) -> impl Iterator<Item = &GradientDraw>

Source

pub fn gradient_count(&self) -> usize

Source

pub fn waveform_bar_count(&self) -> usize

Source

pub fn len(&self) -> usize

Source

pub fn is_empty(&self) -> bool

Source

pub fn mark(&self) -> RenderMark

Records the current end of the list for RenderList::suffix.

Source

pub fn suffix(&self, mark: RenderMark) -> Option<Self>

Captures everything added since mark.

Backdrop, filter, and opacity spans are rebased to the start of the suffix so RenderList::append can replay them. Returns None if the clip/transform/opacity stacks are left open or the mark is out of bounds.

Source

pub fn append(&mut self, other: &Self)

Appends a cached suffix produced by RenderList::suffix.

Parent clip/transform/opacity state is not replayed: the captured items already contain their resolved clips and transforms. Backdrop, filter, and opacity spans are shifted by the current item count.

Trait Implementations§

Source§

impl Clone for RenderList

Source§

fn clone(&self) -> Self

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 Debug for RenderList

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for RenderList

Source§

fn default() -> Self

Returns the “default value” for a type. 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> 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 = !

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

fn try_from(value: U) -> Result<T, !>

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.