pub struct LinearGradientTemplate {
pub common: PrimTemplateCommonData,
pub extend_mode: ExtendMode,
pub start_point: LayoutPoint,
pub end_point: LayoutPoint,
pub stretch_ratio: LayoutSize,
pub tile_spacing: LayoutSize,
pub stops_opacity: PrimitiveOpacity,
pub stops: Vec<GradientStop>,
pub border_nine_patch: Option<Box<NinePatchDescriptor>>,
pub reverse_stops: bool,
}Fields§
§common: PrimTemplateCommonData§extend_mode: ExtendMode§start_point: LayoutPoint§end_point: LayoutPoint§stretch_ratio: LayoutSizePer-axis fraction of common.prim_size covered by one tile of the
gradient pattern. Multiply by common.prim_size at use to recover the
absolute stretch_size.
tile_spacing: LayoutSize§stops_opacity: PrimitiveOpacity§stops: Vec<GradientStop>§border_nine_patch: Option<Box<NinePatchDescriptor>>§reverse_stops: boolTrait Implementations§
Source§impl Debug for LinearGradientTemplate
impl Debug for LinearGradientTemplate
Source§impl DerefMut for LinearGradientTemplate
impl DerefMut for LinearGradientTemplate
Source§impl From<LinearGradientKey> for LinearGradientTemplate
impl From<LinearGradientKey> for LinearGradientTemplate
Source§fn from(item: LinearGradientKey) -> Self
fn from(item: LinearGradientKey) -> Self
Converts to this type from the input type.
Source§impl MallocSizeOf for LinearGradientTemplate
impl MallocSizeOf for LinearGradientTemplate
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 PatternBuilder for LinearGradientTemplate
impl PatternBuilder for LinearGradientTemplate
fn build( &self, _sub_rect: Option<DeviceRect>, offset: LayoutVector2D, ctx: &PatternBuilderContext<'_>, state: &mut PatternBuilderState<'_>, ) -> Pattern
Source§impl Serialize for LinearGradientTemplate
impl Serialize for LinearGradientTemplate
Auto Trait Implementations§
impl Freeze for LinearGradientTemplate
impl RefUnwindSafe for LinearGradientTemplate
impl Send for LinearGradientTemplate
impl Sync for LinearGradientTemplate
impl Unpin for LinearGradientTemplate
impl UnsafeUnpin for LinearGradientTemplate
impl UnwindSafe for LinearGradientTemplate
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