()
| 103 | } |
| 104 | |
| 105 | func (t *Triangle) Rasterize() []Scanline { |
| 106 | buf := t.Worker.Lines[:0] |
| 107 | lines := rasterizeTriangle(t.X1, t.Y1, t.X2, t.Y2, t.X3, t.Y3, buf) |
| 108 | return cropScanlines(lines, t.Worker.W, t.Worker.H) |
| 109 | } |
| 110 | |
| 111 | func rasterizeTriangle(x1, y1, x2, y2, x3, y3 int, buf []Scanline) []Scanline { |
| 112 | if y1 > y3 { |
nothing calls this directly
no test coverage detected