atomize-element-interface #2

Merged
sashakoshka merged 20 commits from atomize-element-interface into main 2023-01-16 17:24:23 +00:00
Showing only changes of commit 18b0ef1159 - Show all commits

View File

@ -4,8 +4,9 @@ import "image"
import "image/draw"
import "image/color"
// Canvas is like Image but also requires Set and SetRGBA methods. This
// interface can be easily satisfied using a BasicCanvas struct.
// Canvas is like draw.Image but is also able to return a raw pixel buffer for
// more efficient drawing. This interface can be easily satisfied using a
// BasicCanvas struct.
type Canvas interface {
draw.Image
Buffer () (data []color.RGBA, stride int)