Skip to main content

ServerCompositionGradientBrush

Struct ServerCompositionGradientBrush 

Source
pub struct ServerCompositionGradientBrush { /* private fields */ }
Expand description

The part of the server-side gradient brushes that upstream’s hand-written ServerCompositionGradientBrush adds to the generated ServerCompositionBrush: the brush properties, the gradient stops and the spread method.

Implementations§

Source§

impl ServerCompositionGradientBrush

Source

pub fn new() -> Self

Source

pub fn brush(&self) -> &ServerCompositionBrushProps

The properties of the generated base class.

Source

pub fn find_props(&self, type_id: TypeId) -> Option<&dyn Any>

This part or the block of its base class, by type.

Source

pub fn id_of_gradient_stops_property() -> &'static CompositionPropertyOf<Vec<Rc<dyn IGradientStop>>>

s_IdOfGradientStopsProperty.

Source

pub fn gradient_stops(&self) -> Vec<Rc<dyn IGradientStop>>

Source

pub fn set_gradient_stops( &self, host: &dyn IServerRenderResourceHost, core: &ServerRenderResourceCore, value: Vec<ServerResourceRef<dyn IGradientStop>>, )

Sets the gradient stops: the render resources among them are observed by the brush (SetValue of the render resource).

Source

pub fn spread_method(&self) -> GradientSpreadMethod

Source

pub fn deserialize_changes_core( &self, host: &dyn ServerCompositionBrushHooks, resource: &dyn IServerRenderResourceHost, core: &ServerRenderResourceCore, reader: &mut BatchStreamReader<'_>, committed_at: Duration, )

DeserializeChangesCore: the generated base class, then the spread method and the stops. host and resource are the brush.

Trait Implementations§

Source§

impl Default for ServerCompositionGradientBrush

Source§

fn default() -> Self

Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> ClassDefaults for T
where T: ?Sized,

Source§

fn static_constructor()

The static constructor of a type: work done once per thread, after the properties of the type are registered and before its first instance exists (class handlers, affects_render, metadata overrides). Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.