atomize-element-interface #2
@ -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)
 | 
			
		||||
 | 
			
		||||
		Reference in New Issue
	
	Block a user