Struct graphics::polygon::Polygon
[−]
[src]
pub struct Polygon { pub color: Color, }
A polygon
Fields
color: Color
The color of the polygon
Methods
impl Polygon
[src]
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
impl Copy for Polygon
[src]
impl Clone for Polygon
[src]
fn clone(&self) -> Polygon
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more