Type Alias style::values::computed::ClipRect

source ·
pub type ClipRect = GenericClipRect<LengthOrAuto>;
Expand description

rect(…) | auto

Aliased Type§

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.