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

Function draw_tri_filled

std/src/console/drawing.rs:435–446  ·  view source on GitHub ↗

Draws a filled triangle via `rasops`.

(
    rasops: &mut R,
    x1y1: PixelsXY,
    x2y2: PixelsXY,
    x3y3: PixelsXY,
)

Source from the content-addressed store, hash-verified

433
434/// Draws a filled triangle via `rasops`.
435pub fn draw_tri_filled<R>(
436 rasops: &mut R,
437 x1y1: PixelsXY,
438 x2y2: PixelsXY,
439 x3y3: PixelsXY,
440) -> io::Result<()>
441where
442 R: RasterOps,
443{
444 fill_polygon(rasops, &[x1y1, x2y2, x3y3])?;
445 draw_tri(rasops, x1y1, x2y2, x3y3)
446}
447
448#[cfg(test)]
449mod testutils {

Callers 3

draw_tri_filledMethod · 0.85
test_draw_tri_filledFunction · 0.85
draw_tri_filledMethod · 0.85

Calls 2

fill_polygonFunction · 0.85
draw_triFunction · 0.85

Tested by 1

test_draw_tri_filledFunction · 0.68