Add gitignore
This commit is contained in:
@@ -2,7 +2,7 @@ package elements
|
||||
|
||||
import "image"
|
||||
import "git.tebibyte.media/sashakoshka/tomo"
|
||||
import "git.tebibyte.media/sashakoshka/tomo/canvas"
|
||||
import "git.tebibyte.media/sashakoshka/tomo/artist"
|
||||
import "git.tebibyte.media/sashakoshka/tomo/artist/patterns"
|
||||
|
||||
// TODO: this element is lame need to make it better
|
||||
@@ -10,7 +10,7 @@ import "git.tebibyte.media/sashakoshka/tomo/artist/patterns"
|
||||
// Image is an element capable of displaying an image.
|
||||
type Image struct {
|
||||
entity tomo.Entity
|
||||
buffer canvas.Canvas
|
||||
buffer artist.Canvas
|
||||
}
|
||||
|
||||
// NewImage creates a new image element.
|
||||
@@ -28,7 +28,7 @@ func (element *Image) Entity () tomo.Entity {
|
||||
}
|
||||
|
||||
// Draw causes the element to draw to the specified destination canvas.
|
||||
func (element *Image) Draw (destination canvas.Canvas) {
|
||||
func (element *Image) Draw (destination artist.Canvas) {
|
||||
if element.entity == nil { return }
|
||||
(patterns.Texture { Canvas: element.buffer }).
|
||||
Draw(destination, element.entity.Bounds())
|
||||
|
||||
Reference in New Issue
Block a user