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§
Sourcefn draw(
self,
treeize_style: &TreeizeStyle,
style: &Style,
rect: Rect,
painter: &Painter,
) -> PinWireInfo
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