pub struct StretchSizeKey {
pub size: SizeKey,
pub fills_width: bool,
pub fills_height: bool,
}Expand description
How to compute the effective stretch size for an image primitive, per
axis. FillsPrim resolves to the (snapped) prim-rect extent at
frame-build so the value sent to the GPU lands on the snapped pixel
grid. Explicit keeps the gecko-specified value verbatim. Per-axis
because gecko can specify a background tile that fills the prim on
one axis but tiles on the other (e.g. background-repeat: repeat-y
with background-size: 116.8px 0.8px).
Fields§
§size: SizeKey§fills_width: bool§fills_height: boolImplementations§
Source§impl StretchSizeKey
impl StretchSizeKey
Sourcepub fn fills_prim() -> Self
pub fn fills_prim() -> Self
Both axes fill the prim. The stored size is unused; normalised to zero so different prim sizes still intern to the same key.
Trait Implementations§
Source§impl Clone for StretchSizeKey
impl Clone for StretchSizeKey
Source§fn clone(&self) -> StretchSizeKey
fn clone(&self) -> StretchSizeKey
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 StretchSizeKey
impl Debug for StretchSizeKey
Source§impl From<StretchSizeKey> for StretchSize
impl From<StretchSizeKey> for StretchSize
Source§fn from(k: StretchSizeKey) -> Self
fn from(k: StretchSizeKey) -> Self
Converts to this type from the input type.
Source§impl Hash for StretchSizeKey
impl Hash for StretchSizeKey
Source§impl MallocSizeOf for StretchSizeKey
impl MallocSizeOf for StretchSizeKey
Source§fn size_of(&self, ops: &mut MallocSizeOfOps) -> usize
fn size_of(&self, ops: &mut MallocSizeOfOps) -> usize
Measure the heap usage of all descendant heap-allocated structures, but
not the space taken up by the value itself.
Source§impl PartialEq for StretchSizeKey
impl PartialEq for StretchSizeKey
Source§impl Serialize for StretchSizeKey
impl Serialize for StretchSizeKey
impl Copy for StretchSizeKey
impl Eq for StretchSizeKey
impl StructuralPartialEq for StretchSizeKey
Auto Trait Implementations§
impl Freeze for StretchSizeKey
impl RefUnwindSafe for StretchSizeKey
impl Send for StretchSizeKey
impl Sync for StretchSizeKey
impl Unpin for StretchSizeKey
impl UnsafeUnpin for StretchSizeKey
impl UnwindSafe for StretchSizeKey
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> 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