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

Method draw_poly_filled

std/src/testutils.rs:391–402  ·  view source on GitHub ↗
(&mut self, points: &[PixelsXY])

Source from the content-addressed store, hash-verified

389 }
390
391 fn draw_poly_filled(&mut self, points: &[PixelsXY]) -> io::Result<()> {
392 match points.len() {
393 0 => Ok(()),
394 1 => self.draw_pixel(points[0]),
395 2 => self.draw_line(points[0], points[1]),
396 3 => self.draw_tri_filled(points[0], points[1], points[2]),
397 _ => {
398 self.captured_out.push(CapturedOut::DrawPolyFilled(points.to_vec()));
399 Ok(())
400 }
401 }
402 }
403
404 fn draw_rect(&mut self, x1y1: PixelsXY, x2y2: PixelsXY) -> io::Result<()> {
405 self.captured_out.push(CapturedOut::DrawRect(x1y1, x2y2));

Callers

nothing calls this directly

Calls 5

pushMethod · 0.80
lenMethod · 0.45
draw_pixelMethod · 0.45
draw_lineMethod · 0.45
draw_tri_filledMethod · 0.45

Tested by

no test coverage detected