Trait PaintNodeExt

Source
pub trait PaintNodeExt: 'static {
    // Required methods
    fn add_child<P: IsA<PaintNode>>(&self, child: &P);
    fn add_rectangle(&self, rect: &ActorBox);
    fn add_texture_rectangle(
        &self,
        rect: &ActorBox,
        x_1: f32,
        y_1: f32,
        x_2: f32,
        y_2: f32,
    );
    fn set_name(&self, name: &str);
}
Expand description

Trait containing all PaintNode methods.

§Implementors

ClipNode, PaintNode, PipelineNode, TextNode

Required Methods§

Source

fn add_child<P: IsA<PaintNode>>(&self, child: &P)

Adds child to the list of children of self.

This function will acquire a reference on child.

§child

the child PaintNode to add

Source

fn add_rectangle(&self, rect: &ActorBox)

Adds a rectangle region to the self, as described by the passed rect.

§rect

a ActorBox

Source

fn add_texture_rectangle( &self, rect: &ActorBox, x_1: f32, y_1: f32, x_2: f32, y_2: f32, )

Adds a rectangle region to the self, with texture coordinates.

§rect

a ActorBox

§x_1

the left X coordinate of the texture

§y_1

the top Y coordinate of the texture

§x_2

the right X coordinate of the texture

§y_2

the bottom Y coordinate of the texture

Source

fn set_name(&self, name: &str)

Sets a user-readable name for self.

The name will be used for debugging purposes.

The self will copy the passed string.

§name

a string annotating the self

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§