Documentation
¶
Overview ¶
Package raster provides scanline rasterization for 2D paths.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ActiveEdge ¶
type ActiveEdge struct {
// contains filtered or unexported fields
}
ActiveEdge is an edge being processed by the rasterizer.
type ActiveEdgeTable ¶
type ActiveEdgeTable struct {
// contains filtered or unexported fields
}
ActiveEdgeTable represents edges active at a scanline.
func NewActiveEdgeTable ¶
func NewActiveEdgeTable() *ActiveEdgeTable
NewActiveEdgeTable creates a new active edge table.
func (*ActiveEdgeTable) Add ¶
func (aet *ActiveEdgeTable) Add(edge Edge)
Add adds an edge to the active edge table.
func (*ActiveEdgeTable) Edges ¶
func (aet *ActiveEdgeTable) Edges() []ActiveEdge
Edges returns the active edges.
func (*ActiveEdgeTable) Remove ¶
func (aet *ActiveEdgeTable) Remove(y float64)
Remove removes inactive edges for the given scanline.
func (*ActiveEdgeTable) Sort ¶
func (aet *ActiveEdgeTable) Sort()
Sort sorts edges by x coordinate (insertion sort for small lists).
func (*ActiveEdgeTable) Update ¶
func (aet *ActiveEdgeTable) Update()
Update updates x positions for the next scanline.
type Edge ¶
type Edge struct {
// contains filtered or unexported fields
}
Edge represents a line segment for scanline rasterization.
type FillRule ¶
type FillRule int
FillRule specifies how to determine which areas are inside a path.
type Point ¶
type Point struct {
X, Y float64
}
Point represents a 2D point (internal copy to avoid import cycle).
type RGBA ¶
type RGBA struct {
R, G, B, A float64
}
RGBA represents a color (internal copy to avoid import cycle).
type Rasterizer ¶
type Rasterizer struct {
// contains filtered or unexported fields
}
Rasterizer performs scanline rasterization.
func NewRasterizer ¶
func NewRasterizer(width, height int) *Rasterizer
NewRasterizer creates a new rasterizer for the given dimensions.
type SpanFiller ¶ added in v0.5.0
SpanFiller is an optional interface that pixmaps can implement for optimized span filling.