(&mut self, points: &[PixelsXY])
| 724 | } |
| 725 | |
| 726 | fn draw_poly(&mut self, points: &[PixelsXY]) -> io::Result<()> { |
| 727 | match points.len() { |
| 728 | 0 => Ok(()), |
| 729 | 1 => self.draw_pixel(points[0]), |
| 730 | 2 => self.draw_line(points[0], points[1]), |
| 731 | 3 => self.draw_tri(points[0], points[1], points[2]), |
| 732 | _ => { |
| 733 | if !poly_points(points) { |
| 734 | return Ok(()); |
| 735 | } |
| 736 | |
| 737 | self.raster_ops.set_draw_color(self.fg_color); |
| 738 | self.raster_ops.draw_poly(points)?; |
| 739 | self.present_canvas() |
| 740 | } |
| 741 | } |
| 742 | } |
| 743 | |
| 744 | fn draw_poly_filled(&mut self, points: &[PixelsXY]) -> io::Result<()> { |
| 745 | match points.len() { |
nothing calls this directly
no test coverage detected