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
[src]
Creates new polygon
fn color(self, color: Color) -> Self
[src]
Sets color.
fn draw<G>(
&self,
polygon: Polygon,
draw_state: &DrawState,
transform: Matrix2d,
g: &mut G
) where
G: Graphics,
[src]
&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,
[src]
&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,
[src]
&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,
[src]
&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.