MCPcopy Index your code
hub / github.com/fogleman/primitive / Rasterize

Method Rasterize

primitive/triangle.go:105–109  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

103}
104
105func (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
111func rasterizeTriangle(x1, y1, x2, y2, x3, y3 int, buf []Scanline) []Scanline {
112 if y1 > y3 {

Callers

nothing calls this directly

Calls 2

rasterizeTriangleFunction · 0.85
cropScanlinesFunction · 0.85

Tested by

no test coverage detected