Add gitignore

This commit is contained in:
Sasha Koshka
2023-05-02 22:19:29 -04:00
committed by Sasha Koshka
parent b84e444697
commit 69e73a7b84
24 changed files with 113 additions and 227 deletions

View File

@@ -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())