pattern.go

Functions Structs Interfaces

Functions

func ColorAt

ColorAt implements Pattern.

func (p *SolidPattern) ColorAt(x, y float64) RGBA {
	return p.Color
}

func NewSolidPattern

NewSolidPattern creates a solid color pattern.

func NewSolidPattern(color RGBA) *SolidPattern {
	return &SolidPattern{Color: color}
}

Structs

type SolidPattern struct

SolidPattern represents a solid color pattern.

type SolidPattern struct {
	Color RGBA
}

Interfaces

type Pattern interface

Pattern represents a fill or stroke pattern.

type Pattern interface {
	// ColorAt returns the color at the given point.
	ColorAt(x, y float64) RGBA
}