TreeizePin

Trait TreeizePin 

Source
pub trait TreeizePin {
    // Required method
    fn draw(
        self,
        treeize_style: &TreeizeStyle,
        style: &Style,
        rect: Rect,
        painter: &Painter,
    ) -> PinWireInfo;

    // Provided method
    fn pin_rect(&self, x0: f32, x1: f32, y: f32, size: f32) -> Rect { ... }
}
Expand description

Uses Painter to draw a pin.

Required Methods§

Source

fn draw( self, treeize_style: &TreeizeStyle, style: &Style, rect: Rect, painter: &Painter, ) -> PinWireInfo

Draws the pin.

rect is the interaction rectangle of the pin. Pin should fit in it. painter is used to add pin’s shapes to the UI.

Returns the color

Provided Methods§

Source

fn pin_rect(&self, x0: f32, x1: f32, y: f32, size: f32) -> Rect

Calculates pin Rect from the given parameters.

Implementors§