Struct graphics::polygon::Polygon
[−]
[src]
pub struct Polygon { pub color: Color, }
A polygon
Fields
color | The color of the polygon |
Methods
impl Polygon
fn new(color: Color) -> Polygon
Creates new polygon
fn color(self, color: Color) -> Self
Sets color.
fn draw<G>(&self, polygon: Polygon, draw_state: &DrawState, transform: Matrix2d, g: &mut G) where G: Graphics
Draws polygon
fn draw_tween_lerp<G>(&self, polygons: Polygons, tween_factor: Scalar, draw_state: &DrawState, transform: Matrix2d, g: &mut G) where G: Graphics
Draws tweened polygon with linear interpolation