MCPcopy Index your code
hub / github.com/endbasic/endbasic / draw_poly_filled

Method draw_poly_filled

std/src/console/graphics.rs:744–760  ·  view source on GitHub ↗
(&mut self, points: &[PixelsXY])

Source from the content-addressed store, hash-verified

742 }
743
744 fn draw_poly_filled(&mut self, points: &[PixelsXY]) -> io::Result<()> {
745 match points.len() {
746 0 => Ok(()),
747 1 => self.draw_pixel(points[0]),
748 2 => self.draw_line(points[0], points[1]),
749 3 => self.draw_tri_filled(points[0], points[1], points[2]),
750 _ => {
751 if !poly_points(points) {
752 return Ok(());
753 }
754
755 self.raster_ops.set_draw_color(self.fg_color);
756 self.raster_ops.draw_poly_filled(points)?;
757 self.present_canvas()
758 }
759 }
760 }
761
762 fn draw_rect(&mut self, x1y1: PixelsXY, x2y2: PixelsXY) -> io::Result<()> {
763 self.raster_ops.set_draw_color(self.fg_color);

Callers

nothing calls this directly

Calls 7

poly_pointsFunction · 0.85
lenMethod · 0.45
draw_pixelMethod · 0.45
draw_lineMethod · 0.45
draw_tri_filledMethod · 0.45
set_draw_colorMethod · 0.45
present_canvasMethod · 0.45

Tested by

no test coverage detected