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

Function test_draw_poly_filled

std/src/console/drawing.rs:964–989  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

962
963 #[test]
964 fn test_draw_poly_filled() {
965 let mut rasops = RecordingRasops::default();
966 draw_poly_filled(
967 &mut rasops,
968 &[
969 PixelsXY::new(10, 20),
970 PixelsXY::new(20, 20),
971 PixelsXY::new(18, 24),
972 PixelsXY::new(12, 24),
973 ],
974 )
975 .unwrap();
976 assert_eq!(
977 [
978 CapturedRasop::DrawLine(10, 20, 20, 20),
979 CapturedRasop::DrawLine(11, 21, 20, 21),
980 CapturedRasop::DrawLine(11, 22, 19, 22),
981 CapturedRasop::DrawLine(12, 23, 19, 23),
982 CapturedRasop::DrawLine(10, 20, 20, 20),
983 CapturedRasop::DrawLine(20, 20, 18, 24),
984 CapturedRasop::DrawLine(18, 24, 12, 24),
985 CapturedRasop::DrawLine(12, 24, 10, 20),
986 ],
987 rasops.ops.as_slice()
988 );
989 }
990
991 #[test]
992 fn test_draw_poly_filled_concave() {

Callers

nothing calls this directly

Calls 1

draw_poly_filledFunction · 0.85

Tested by

no test coverage detected