Skip to main content

CompositionRenderData

Struct CompositionRenderData 

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

What a visual drew, on the UI thread: the recorded stream (kept for hit testing) and the id of its server-side counterpart.

Implementations§

Source§

impl CompositionRenderData

Source

pub fn server(&self) -> ServerObjectId

The id of the server-side render data.

Source

pub fn dispose(&self)

Releases the render data: the resource references it holds and its server-side counterpart.

Source

pub fn hit_test(&self, pt: Point) -> bool

Whether anything drawn is hit at a point.

Source

pub fn hit_test_geometry(&self, geometry: &Ref<Geometry>) -> IntersectionResult

How the drawn content intersects a geometry.

Trait Implementations§

Source§

impl ICompositorSerializable for CompositionRenderData

Source§

fn try_get_server(&self, _c: &Compositor) -> Option<ServerObjectId>

The server-side counterpart of the object on compositor c, if it has one.
Source§

fn serialize_changes(&self, _c: &Compositor, writer: &mut BatchStreamWriter<'_>)

Writes the pending changes of the object for compositor c.
Source§

fn serialization_key(&self) -> *const ()

The identity of the object, by which a compositor avoids queueing it twice. The default is the address of the implementing value; an adapter around an object returns the identity of that object.
Source§

fn prepare_serialization(&self, _c: &Compositor)

Called before the changes of the object are written for compositor c. 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.