#[non_exhaustive]pub enum DisplayItem {
Show 23 variants
Reuse {
frame_id: FrameId,
seg_id: SegmentId,
start: usize,
end: usize,
},
PushReferenceFrame {
id: ReferenceFrameId,
transform: FrameValue<PxTransform>,
transform_style: TransformStyle,
is_2d_scale_translation: bool,
},
PopReferenceFrame,
PushStackingContext {
transform_style: TransformStyle,
blend_mode: MixBlendMode,
filters: Box<[FilterOp]>,
},
PopStackingContext,
PushClipRect {
clip_rect: PxRect,
clip_out: bool,
},
PushClipRoundedRect {
clip_rect: PxRect,
corners: PxCornerRadius,
clip_out: bool,
},
PopClip,
PushMask {
image_id: ImageTextureId,
rect: PxRect,
},
PopMask,
Border {
bounds: PxRect,
widths: PxSideOffsets,
sides: [BorderSide; 4],
radius: PxCornerRadius,
},
NinePatchBorder {
bounds: PxRect,
source: NinePatchSource,
widths: PxSideOffsets,
img_size: PxSize,
slice: PxSideOffsets,
fill: bool,
repeat_horizontal: RepeatMode,
repeat_vertical: RepeatMode,
},
Text {
clip_rect: PxRect,
font_id: FontId,
glyphs: Box<[GlyphInstance]>,
color: FrameValue<Rgba>,
options: GlyphOptions,
},
Image {
clip_rect: PxRect,
image_id: ImageTextureId,
image_size: PxSize,
rendering: ImageRendering,
alpha_type: AlphaType,
tile_size: PxSize,
tile_spacing: PxSize,
},
Color {
clip_rect: PxRect,
color: FrameValue<Rgba>,
},
BackdropFilter {
clip_rect: PxRect,
filters: Box<[FilterOp]>,
},
LinearGradient {
clip_rect: PxRect,
start_point: Point2D<f32, Px>,
end_point: Point2D<f32, Px>,
extend_mode: ExtendMode,
stops: Box<[GradientStop]>,
tile_origin: PxPoint,
tile_size: PxSize,
tile_spacing: PxSize,
},
RadialGradient {
clip_rect: PxRect,
center: Point2D<f32, Px>,
radius: Size2D<f32, Px>,
start_offset: f32,
end_offset: f32,
extend_mode: ExtendMode,
stops: Box<[GradientStop]>,
tile_origin: PxPoint,
tile_size: PxSize,
tile_spacing: PxSize,
},
ConicGradient {
clip_rect: PxRect,
center: Point2D<f32, Px>,
angle: AngleRadian,
start_offset: f32,
end_offset: f32,
extend_mode: ExtendMode,
stops: Box<[GradientStop]>,
tile_origin: PxPoint,
tile_size: PxSize,
tile_spacing: PxSize,
},
Line {
clip_rect: PxRect,
color: Rgba,
style: LineStyle,
orientation: LineOrientation,
},
PushExtension {
extension_id: ApiExtensionId,
payload: ApiExtensionPayload,
},
PopExtension {
extension_id: ApiExtensionId,
},
SetBackfaceVisibility {
visible: bool,
},
}Expand description
Display item in a DisplayList.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Reuse
PushReferenceFrame
PopReferenceFrame
PushStackingContext
PopStackingContext
PushClipRect
PushClipRoundedRect
PopClip
PushMask
PopMask
Border
NinePatchBorder
Fields
§
source: NinePatchSource§
widths: PxSideOffsets§
slice: PxSideOffsets§
repeat_horizontal: RepeatMode§
repeat_vertical: RepeatModeText
Image
Color
BackdropFilter
LinearGradient
RadialGradient
ConicGradient
Line
PushExtension
PopExtension
Fields
§
extension_id: ApiExtensionIdSetBackfaceVisibility
Implementations§
Source§impl DisplayItem
impl DisplayItem
Sourcepub fn update_transform(&mut self, t: &FrameValueUpdate<PxTransform>) -> bool
pub fn update_transform(&mut self, t: &FrameValueUpdate<PxTransform>) -> bool
Update the value and returns if a new full frame must be rendered.
Sourcepub fn update_float(&mut self, t: &FrameValueUpdate<f32>) -> bool
pub fn update_float(&mut self, t: &FrameValueUpdate<f32>) -> bool
Update the value and returns if a new full frame must be rendered.
Sourcepub fn update_color(&mut self, t: &FrameValueUpdate<Rgba>) -> bool
pub fn update_color(&mut self, t: &FrameValueUpdate<Rgba>) -> bool
Update the value and returns if a new full frame must be rendered.
Trait Implementations§
Source§impl Clone for DisplayItem
impl Clone for DisplayItem
Source§fn clone(&self) -> DisplayItem
fn clone(&self) -> DisplayItem
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for DisplayItem
impl Debug for DisplayItem
Source§impl<'de> Deserialize<'de> for DisplayItem
impl<'de> Deserialize<'de> for DisplayItem
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for DisplayItem
impl RefUnwindSafe for DisplayItem
impl Send for DisplayItem
impl Sync for DisplayItem
impl Unpin for DisplayItem
impl UnwindSafe for DisplayItem
Blanket Implementations§
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more