MCPcopy
hub / github.com/fogleman/primitive / Rasterize

Method Rasterize

primitive/polygon.go:111–122  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

109}
110
111func (p *Polygon) Rasterize() []Scanline {
112 var path raster.Path
113 for i := 0; i <= p.Order; i++ {
114 f := fixp(p.X[i%p.Order], p.Y[i%p.Order])
115 if i == 0 {
116 path.Start(f)
117 } else {
118 path.Add1(f)
119 }
120 }
121 return fillPath(p.Worker, path)
122}

Callers

nothing calls this directly

Calls 2

fixpFunction · 0.85
fillPathFunction · 0.85

Tested by

no test coverage detected