Skip to main content

ServerCompositionSimplePen

Struct ServerCompositionSimplePen 

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

The server-side counterpart of a mutable pen.

Implementations§

Source§

impl ServerCompositionSimplePen

Source

pub fn new(compositor: &Rc<ServerCompositor>) -> Rc<ServerCompositionSimplePen>

Source

pub fn is_disposed(&self) -> bool

Source

pub fn props(&self) -> &ServerCompositionSimplePenProps

The properties of the pen.

Source

pub fn set_brush(&self, value: Option<ServerResourceRef<dyn IBrush>>)

Source

pub fn set_dash_style(&self, value: Option<Arc<ImmutableDashStyle>>)

Source

pub fn set_line_cap(&self, value: PenLineCap)

Source

pub fn set_line_join(&self, value: PenLineJoin)

Source

pub fn set_miter_limit(&self, value: f64)

Source

pub fn set_thickness(&self, value: f64)

Trait Implementations§

Source§

impl IPen for ServerCompositionSimplePen

Source§

fn brush(&self) -> Option<Rc<dyn IBrush>>

The brush used to draw the stroke.
Source§

fn dash_style(&self) -> Option<Rc<dyn IDashStyle>>

The style of dashed lines drawn with the pen.
Source§

fn line_cap(&self) -> PenLineCap

The type of shape to use on both ends of a line.
Source§

fn line_join(&self) -> PenLineJoin

A value describing how to join consecutive line or curve segments.
Source§

fn miter_limit(&self) -> f64

The limit of the ratio of the miter length to half this pen’s thickness.
Source§

fn thickness(&self) -> f64

The stroke thickness.
Source§

fn as_any(&self) -> &dyn Any

The implementing value, for downcasts to ImmutablePen.
Source§

fn into_immutable_pen(self: Rc<Self>) -> Rc<ImmutablePen>

Converts the pen to an immutable pen; an immutable pen returns itself.
Source§

fn as_immutable_pen(&self) -> Option<&ImmutablePen>

The pen viewed as an ImmutablePen, when it is one (the is ImmutablePen test of upstream, which a class deriving from it passes).
Source§

fn as_object(&self) -> Option<&FerroObject>

The object behind the pen when it is a mutable Pen.
Source§

fn as_composition_render_resource( &self, ) -> Option<&dyn ICompositionRenderResource>

The composition render resource behind the object, if it is a mutable object with server-side counterparts on the compositors it is drawn with.
Source§

fn to_shared(&self) -> Option<SharedPen>

The form of the pen that is sent to the render thread, when the type keeps one: see SharedPen.
Source§

fn equals(&self, other: &dyn IPen) -> bool

Whether the pen equals other. Mutable pens compare by reference, immutable ones structurally (against any pen).
Source§

impl IServerObject for ServerCompositionSimplePen

Source§

fn deserialize_changes_core( &self, reader: &mut BatchStreamReader<'_>, committed_at: Duration, )

Reads the changes of the object from a batch.
Source§

fn values_invalidated(&self)

Called after a group of values of the object changed.
Source§

fn dispose(&self)

Releases the object: it has been disposed on the UI thread.
Source§

fn as_render_resource(self: Rc<Self>) -> Option<Rc<dyn IServerRenderResource>>

The object as a render resource, if it is one.
Source§

fn as_pen(self: Rc<Self>) -> Option<Rc<dyn IPen>>

The object as a pen, if it is a server-side pen.
Source§

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

The generated property block of the given type embedded in the object, if it has one. A class that embeds generated properties forwards to their find_props; composition properties locate their fields through it.
Source§

fn as_any(&self) -> &dyn Any

Source§

fn into_any_rc(self: Rc<Self>) -> Rc<dyn Any>

Source§

fn deserialize_changes( &self, reader: &mut BatchStreamReader<'_>, committed_at: Duration, )

Applies the changes of the object from a batch.
Source§

fn as_brush(self: Rc<Self>) -> Option<Rc<dyn IBrush>>

The object as a brush, if it is a server-side brush.
Source§

fn as_render_data_geometry( self: Rc<Self>, ) -> Option<Rc<dyn IRenderDataGeometry>>

The object as a geometry usable by render data, if it is a server-side geometry.
Source§

fn as_transform(self: Rc<Self>) -> Option<Rc<dyn ITransform>>

The object as a transform, if it is a server-side transform.
Source§

fn as_gradient_stop(self: Rc<Self>) -> Option<Rc<dyn IGradientStop>>

The object as a gradient stop, if it is a server-side gradient stop.
Source§

fn as_surface(self: Rc<Self>) -> Option<Rc<dyn IServerCompositionSurface>>

The object as a composition surface, if it is one.
Source§

fn as_animated(self: Rc<Self>) -> Option<Rc<dyn IAnimatedServerObject>>

The object as an animatable object, if it is one.
Source§

impl IServerPropertyHost for ServerCompositionSimplePen

Source§

fn server_compositor(&self) -> Option<Rc<ServerCompositor>>

The compositor of the object, while it is alive. Used to resolve the server objects a batch refers to.
Source§

fn set_value( &self, _property: &'static CompositionProperty, change: ServerValueChange<'_>, )

SetValue(prop, ref field, value) as the class of the object defines it. A plain server object assigns; an animated object also invalidates the subscriptions of the property; a render resource goes through super::ServerRenderResourceCore::set_value.
Source§

impl IServerRenderResource for ServerCompositionSimplePen

Source§

impl IServerRenderResourceHost for ServerCompositionSimplePen

Source§

fn compositor(&self) -> Option<Rc<ServerCompositor>>

The compositor of the resource, while it is alive.
Source§

fn as_render_resource_rc(&self) -> Option<Rc<dyn IServerRenderResource>>

The resource as a shared handle, for the invalidation queue.
Source§

fn resource_property_changed(&self)

Called once per group of property changes, before the queued invalidation.
Source§

impl IServerRenderResourceObserver for ServerCompositionSimplePen

Source§

impl ServerCompositionSimplePenHooks for ServerCompositionSimplePen

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.