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

15 lines
545 B
Go
Raw Normal View History

2023-01-14 10:41:51 -07:00
package artist
2023-02-23 12:44:54 -07:00
import "image"
import "git.tebibyte.media/sashakoshka/tomo/canvas"
2023-01-14 10:41:51 -07:00
2023-02-23 12:44:54 -07:00
// Pattern is capable of drawing to a canvas within the bounds of a given
// clipping rectangle.
2023-01-14 10:41:51 -07:00
type Pattern interface {
// Draw draws the pattern onto the destination canvas, using the
// specified bounds. The given bounds can be smaller or larger than the
// bounds of the destination canvas. The destination canvas can be cut
// using canvas.Cut() to draw only a specific subset of a pattern.
Draw (destination canvas.Canvas, bounds image.Rectangle)
2023-01-14 10:41:51 -07:00
}