Type Alias ClipRect

Source
pub type ClipRect = GenericClipRect<LengthOrAuto>;
Expand description

rect(…) | auto

Aliased Type§

#[repr(C)]
pub struct ClipRect { pub top: GenericLengthPercentageOrAuto<CSSPixelLength>, pub right: GenericLengthPercentageOrAuto<CSSPixelLength>, pub bottom: GenericLengthPercentageOrAuto<CSSPixelLength>, pub left: GenericLengthPercentageOrAuto<CSSPixelLength>, }

Fields§

§top: GenericLengthPercentageOrAuto<CSSPixelLength>§right: GenericLengthPercentageOrAuto<CSSPixelLength>§bottom: GenericLengthPercentageOrAuto<CSSPixelLength>§left: GenericLengthPercentageOrAuto<CSSPixelLength>

Implementations§

Source§

impl ClipRect

Source

pub fn for_border_rect<T: Copy + From<Length> + Add<Output = T> + Sub<Output = T>, U>( &self, border_box: Rect<T, U>, ) -> Rect<T, U>

Given a border box, resolves the clip rect against the border box in the same space the border box is in

Trait Implementations§

Source§

impl Animate for ClipRect

Source§

fn animate(&self, other: &Self, procedure: Procedure) -> Result<Self, ()>

Animate a value towards another one, given an animation procedure.