struct LinearGradientSegmentPattern {
start: LayoutPoint,
end: LayoutPoint,
stops: [GradientStop; 2],
}Expand description
Pattern builder for a single fast-path two-stop segment emitted by
decompose_axis_aligned_gradient. Holds the segment’s gradient line and
stop colors (in segment-local coords); build translates start/end into
the prim’s spatial-node space by adding ctx.prim_origin.
Fields§
§start: LayoutPoint§end: LayoutPoint§stops: [GradientStop; 2]Trait Implementations§
Source§impl PatternBuilder for LinearGradientSegmentPattern
impl PatternBuilder for LinearGradientSegmentPattern
fn build( &self, _sub_rect: Option<DeviceRect>, offset: LayoutVector2D, ctx: &PatternBuilderContext<'_>, state: &mut PatternBuilderState<'_>, ) -> Pattern
Auto Trait Implementations§
impl Freeze for LinearGradientSegmentPattern
impl RefUnwindSafe for LinearGradientSegmentPattern
impl Send for LinearGradientSegmentPattern
impl Sync for LinearGradientSegmentPattern
impl Unpin for LinearGradientSegmentPattern
impl UnsafeUnpin for LinearGradientSegmentPattern
impl UnwindSafe for LinearGradientSegmentPattern
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