pub struct PrimitiveInstance {
pub kind: PrimitiveKind,
pub clip_leaf_id: ClipLeafId,
pub unsnapped_prim_rect: LayoutRect,
}Fields§
§kind: PrimitiveKindIdentifies the kind of primitive this instance is, and references to where the relevant information for the primitive can be found.
clip_leaf_id: ClipLeafIdAll information and state related to clip(s) for this primitive
unsnapped_prim_rect: LayoutRectLocal-space rect of the primitive (origin + size), as authored by the
display list (not snapped to the device pixel grid). Carries both the
position and the per-instance size; the latter used to live on
PrimTemplateCommonData.prim_size but is per-instance now so that the
intern key can deduplicate across differently-sized instances of the
same prim shape.
Implementations§
Source§impl PrimitiveInstance
impl PrimitiveInstance
pub fn new( kind: PrimitiveKind, clip_leaf_id: ClipLeafId, unsnapped_prim_rect: LayoutRect, ) -> Self
pub fn uid(&self) -> ItemUid
Trait Implementations§
Source§impl Debug for PrimitiveInstance
impl Debug for PrimitiveInstance
Auto Trait Implementations§
impl Freeze for PrimitiveInstance
impl RefUnwindSafe for PrimitiveInstance
impl Send for PrimitiveInstance
impl Sync for PrimitiveInstance
impl Unpin for PrimitiveInstance
impl UnsafeUnpin for PrimitiveInstance
impl UnwindSafe for PrimitiveInstance
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> 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