This repository has been archived on 2023-08-08. You can view files and clone it, but cannot push or open issues or pull requests.
tomo-old/artist/pattern.go

13 lines
462 B
Go
Raw Normal View History

2023-01-14 10:41:51 -07:00
package artist
import "image/color"
// Pattern is capable of generating a pattern pixel by pixel.
type Pattern interface {
// AtWhen returns the color of the pixel located at (x, y) relative to
// the origin point of the pattern (0, 0), when the pattern has the
// specified width and height. Patterns may ignore the width and height
// parameters, but it may be useful for some patterns such as gradients.
AtWhen (x, y, width, height int) (color.RGBA)
}