pub struct CustomDraw {
pub order: DrawOrder,
pub bounds: Bounds<ScaledPixels>,
pub content_mask: ContentMask<ScaledPixels>,
pub corner_radii: Corners<ScaledPixels>,
pub opacity: f32,
pub content: Arc<dyn CustomContent>,
pub coverage: Option<CustomCoverage>,
}Expand description
Retained custom drawing. CPU ownership data is never uploaded as an instance struct.
Fields§
§order: DrawOrderAssigned by scene insertion.
bounds: Bounds<ScaledPixels>Destination in scaled scene coordinates.
content_mask: ContentMask<ScaledPixels>Inherited rectangular clip.
corner_radii: Corners<ScaledPixels>Local corner coverage, in scaled pixels.
opacity: f32Inherited element opacity, applied once at composition.
content: Arc<dyn CustomContent>Owned immutable content snapshot, shared across scene replay.
Window painting retains original logical geometry internally. For directly
constructed records, preparation uses bounds.size as logical size at 1x.
coverage: Option<CustomCoverage>Optional native shape mask; None uses rounded rectangle coverage.
Trait Implementations§
Source§impl Clone for CustomDraw
impl Clone for CustomDraw
Source§impl Debug for CustomDraw
impl Debug for CustomDraw
Source§impl From<CustomDraw> for Primitive
impl From<CustomDraw> for Primitive
Source§fn from(draw: CustomDraw) -> Self
fn from(draw: CustomDraw) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl !RefUnwindSafe for CustomDraw
impl !UnwindSafe for CustomDraw
impl Freeze for CustomDraw
impl Send for CustomDraw
impl Sync for CustomDraw
impl Unpin for CustomDraw
impl UnsafeUnpin for CustomDraw
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§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