Moved artist (now art) into another repo

This commit is contained in:
2023-05-03 20:17:48 -04:00
parent 54ea1c283f
commit 501eb34922
36 changed files with 191 additions and 186 deletions

View File

@@ -2,7 +2,7 @@ package x
import "image"
import "tomo"
import "tomo/artist"
import "art"
import "tomo/ability"
type entity struct {
@@ -159,7 +159,7 @@ func (entity *entity) SetMinimumSize (width, height int) {
}
}
func (entity *entity) DrawBackground (destination artist.Canvas) {
func (entity *entity) DrawBackground (destination art.Canvas) {
if entity.parent != nil {
entity.parent.element.(ability.Container).DrawBackground(destination)
} else if entity.window != nil {

View File

@@ -1,7 +1,7 @@
package x
import "image"
import "tomo/artist"
import "art"
import "tomo/ability"
type entitySet map[*entity] struct { }
@@ -22,7 +22,7 @@ func (set entitySet) Add (entity *entity) {
type system struct {
child *entity
focused *entity
canvas artist.BasicCanvas
canvas art.BasicCanvas
invalidateIgnore bool
drawingInvalid entitySet
@@ -167,7 +167,7 @@ func (system *system) draw () {
for entity := range system.drawingInvalid {
if entity.clippedBounds.Empty() { continue }
entity.element.Draw (artist.Cut (
entity.element.Draw (art.Cut (
system.canvas,
entity.clippedBounds))
finalBounds = finalBounds.Union(entity.clippedBounds)

View File

@@ -13,7 +13,7 @@ import "github.com/jezek/xgbutil/mousebind"
import "github.com/jezek/xgbutil/xgraphics"
import "tomo"
import "tomo/data"
import "tomo/artist"
import "art"
type mainWindow struct { *window }
type menuWindow struct { *window }
@@ -414,7 +414,7 @@ func (window *window) pasteAndPush (region image.Rectangle) {
}
func (window *window) paste (region image.Rectangle) {
canvas := artist.Cut(window.canvas, region)
canvas := art.Cut(window.canvas, region)
data, stride := canvas.Buffer()
bounds := canvas.Bounds().Intersect(window.xCanvas.Bounds())