MultiPointed

Trait MultiPointed 

Source
pub trait MultiPointed {
    // Required methods
    fn get_point(&self, idx: usize) -> Option<Point<i32>>;
    fn set_point(&mut self, idx: usize, p: Point<i32>);
    fn points(&self) -> &[Point<i32>];
    fn set_points(&mut self, points: Vec<Point<i32>>);
}
Expand description

A collection of points intended for general shapes, usually is implemented when a variable amount of points and or more than two Points are needed for a drawable

Required Methods§

Source

fn get_point(&self, idx: usize) -> Option<Point<i32>>

get a point at the given index

Source

fn set_point(&mut self, idx: usize, p: Point<i32>)

set a point at the given index

Source

fn points(&self) -> &[Point<i32>]

get all current points

Source

fn set_points(&mut self, points: Vec<Point<i32>>)

replace all current points

Implementors§