Moved artist (now art) into another repo
This commit is contained in:
@@ -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 {
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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())
|
||||
|
||||
|
||||
Reference in New Issue
Block a user