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 using the default method.

fn draw_tri<G>(&self, polygon: Polygon, draw_state: &DrawState, transform: Matrix2d, g: &mut G) where G: Graphics

Draws polygon using triangulation.

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, using default method.

fn draw_tween_lerp_tri<G>(&self, polygons: Polygons, tween_factor: Scalar, draw_state: &DrawState, transform: Matrix2d, g: &mut G) where G: Graphics

Draws tweened polygon with linear interpolation, using triangulation.

Trait Implementations

Derived Implementations

impl Clone for Polygon

fn clone(&self) -> Polygon

1.0.0fn clone_from(&mut self, source: &Self)

impl Copy for Polygon