pub enum DisplayOp {
Show 15 variants
Save,
Restore,
ClipRect(LayoutRect),
ClipRoundedRect {
rect: LayoutRect,
radius: f32,
},
OpacityLayer {
alpha: f32,
bounds: LayoutRect,
},
Translate(LayoutPoint),
Transform([f32; 16]),
CachedScene {
cache_key: u64,
bounds: LayoutRect,
list: Box<DisplayList>,
},
DrawRect {
rect: LayoutRect,
fill: Option<Fill>,
stroke: Option<Stroke>,
corner_radius: f32,
shadow: Option<BoxShadow>,
bounds: LayoutRect,
node_id: Option<WidgetId>,
},
DrawText {Show 14 fields
text: String,
position: LayoutPoint,
size: f32,
color: Color,
bounds: LayoutRect,
node_id: Option<WidgetId>,
underline: bool,
wrap: bool,
caret_index: Option<usize>,
caret_color: Option<Color>,
caret_width: Option<f32>,
caret_height: Option<f32>,
caret_radius: Option<f32>,
paragraph_style: Option<TextParagraphStyle>,
},
DrawRichText {
runs: Vec<TextRun>,
position: LayoutPoint,
bounds: LayoutRect,
node_id: Option<WidgetId>,
wrap: bool,
caret_index: Option<usize>,
caret_color: Option<Color>,
caret_width: Option<f32>,
caret_height: Option<f32>,
caret_radius: Option<f32>,
paragraph_style: Option<TextParagraphStyle>,
annotations: Vec<RichTextAnnotation>,
},
DrawImage {
rect: LayoutRect,
request: ImageRequest,
fit: ImageFit,
alignment: ImageAlignment,
bounds: LayoutRect,
node_id: Option<WidgetId>,
},
DrawPath {
path: String,
fill: Option<Fill>,
stroke: Option<Stroke>,
bounds: LayoutRect,
node_id: Option<WidgetId>,
},
DrawSvg {
content: String,
fill: Option<Fill>,
stroke: Option<Stroke>,
bounds: LayoutRect,
node_id: Option<WidgetId>,
},
DrawSurface {
rect: LayoutRect,
surface_id: u64,
position: u64,
bounds: LayoutRect,
node_id: Option<WidgetId>,
},
}Variants§
Save
Restore
ClipRect(LayoutRect)
ClipRoundedRect
OpacityLayer
Translate(LayoutPoint)
Transform([f32; 16])
CachedScene
DrawRect
DrawText
DrawRichText
Fields
§
position: LayoutPoint§
bounds: LayoutRect§
paragraph_style: Option<TextParagraphStyle>§
annotations: Vec<RichTextAnnotation>DrawImage
DrawPath
Fields
§
bounds: LayoutRectDrawSvg
Fields
§
bounds: LayoutRectDrawSurface
Trait Implementations§
Source§impl<'de> Deserialize<'de> for DisplayOp
impl<'de> Deserialize<'de> for DisplayOp
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<DisplayOp, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<DisplayOp, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Serialize for DisplayOp
impl Serialize for DisplayOp
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl StructuralPartialEq for DisplayOp
Auto Trait Implementations§
impl Freeze for DisplayOp
impl RefUnwindSafe for DisplayOp
impl Send for DisplayOp
impl Sync for DisplayOp
impl Unpin for DisplayOp
impl UnsafeUnpin for DisplayOp
impl UnwindSafe for DisplayOp
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§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
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