Enum zng_view_api::display_list::DisplayItem
source · 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,
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§
Reuse
PushReferenceFrame
PopReferenceFrame
PushStackingContext
PopStackingContext
PushClipRect
PushClipRoundedRect
PopClip
PushMask
PopMask
Border
NinePatchBorder
Fields
§
source: NinePatchSource
§
widths: PxSideOffsets
§
repeat_horizontal: RepeatMode
§
repeat_vertical: RepeatMode
Text
Image
Color
BackdropFilter
LinearGradient
RadialGradient
ConicGradient
Line
PushExtension
PopExtension
Fields
§
extension_id: ApiExtensionId
SetBackfaceVisibility
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 copy 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,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)§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