Text rendering is a thing again

This commit is contained in:
2023-01-14 12:41:51 -05:00
parent 34bf3038ac
commit ec24eb7b4f
6 changed files with 88 additions and 61 deletions

12
artist/pattern.go Normal file
View File

@@ -0,0 +1,12 @@
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)
}