Trait Graphics
Source pub trait Graphics {
Show 32 methods
// Required methods
fn draw_pixel(&self, point: Point, color: Color);
fn draw_horiz_line(&self, x1: i16, x2: i16, y: i16, color: Color);
fn draw_vert_line(&self, x: i16, y1: i16, y2: i16, color: Color);
fn draw_line(&self, point1: Point, point2: Point, color: Color);
fn draw_antialiased_line(&self, point1: Point, point2: Point, color: Color);
fn draw_thick_line(
&self,
point1: Point,
point2: Point,
width: u8,
color: Color,
);
fn draw_rectangle(&self, point1: Point, point2: Point, color: Color);
fn draw_rounded_rectangle(
&self,
point1: Point,
point2: Point,
radius: i16,
color: Color,
);
fn draw_filled_rectangle(&self, point1: Point, point2: Point, color: Color);
fn draw_rounded_filled_rectangle(
&self,
point1: Point,
point2: Point,
radius: i16,
color: Color,
);
fn draw_circle(&self, center: Point, radius: i16, color: Color);
fn draw_filled_circle(&self, center: Point, radius: i16, color: Color);
fn draw_antialiased_circle(&self, center: Point, radius: i16, color: Color);
fn draw_arc(
&self,
center: Point,
radius: i16,
start: i16,
end: i16,
color: Color,
);
fn draw_ellipse(
&self,
center: Point,
x_radius: i16,
y_radius: i16,
color: Color,
);
fn draw_filled_ellipse(
&self,
center: Point,
x_radius: i16,
y_radius: i16,
color: Color,
);
fn draw_antialiased_ellipse(
&self,
center: Point,
x_radius: i16,
y_radius: i16,
color: Color,
);
fn draw_pie(
&self,
center: Point,
radius: i16,
start: i16,
end: i16,
color: Color,
);
fn draw_filled_pie(
&self,
center: Point,
radius: i16,
start: i16,
end: i16,
color: Color,
);
fn draw_triangle(&self, points: [Point; 3], color: Color);
fn draw_filled_triangle(&self, points: [Point; 3], color: Color);
fn draw_antialiased_triangle(&self, points: [Point; 3], color: Color);
fn draw_polygon_list(
&self,
x_points: &[i16],
y_points: &[i16],
color: Color,
);
fn draw_filled_polygon_list(
&self,
x_points: &[i16],
y_points: &[i16],
color: Color,
);
fn draw_antialiased_polygon_list(
&self,
x_points: &[i16],
y_points: &[i16],
color: Color,
);
fn draw_textured_polygon_list(
&self,
x_points: &[i16],
y_points: &[i16],
texture: &Surface,
texture_offset: Point,
);
fn draw_bezier_list(
&self,
x_points: &[i16],
y_points: &[i16],
interpolation: i32,
color: Color,
);
// Provided methods
fn draw_polygon(&self, points: &[Point], color: Color) { ... }
fn draw_filled_polygon(&self, points: &[Point], color: Color) { ... }
fn draw_antialiased_polygon(&self, points: &[Point], color: Color) { ... }
fn draw_textured_polygon(
&self,
points: &[Point],
texture: &Surface,
texture_offset: Point,
) { ... }
fn draw_bezier(&self, points: &[Point], interpolation: i32, color: Color) { ... }
}