I forgor to commit all this stuff
This commit is contained in:
@@ -3,6 +3,7 @@ package xcanvas
|
||||
import "image"
|
||||
import "image/color"
|
||||
import "github.com/jezek/xgbutil"
|
||||
import "github.com/jezek/xgb/xproto"
|
||||
import "git.tebibyte.media/tomo/ggfx"
|
||||
import "github.com/jezek/xgbutil/xgraphics"
|
||||
import "git.tebibyte.media/tomo/tomo/canvas"
|
||||
@@ -36,10 +37,16 @@ func (this Canvas) Pen () canvas.Pen {
|
||||
}
|
||||
|
||||
// Clip returns a sub-canvas of this canvas.
|
||||
func (this Canvas) Clip (bounds image.Rectangle) Canvas {
|
||||
func (this Canvas) Clip (bounds image.Rectangle) canvas.Canvas {
|
||||
return Canvas { this.Image.SubImage(bounds).(*xgraphics.Image) }
|
||||
}
|
||||
|
||||
// Push pushes this canvas to the screen.
|
||||
func (this Canvas) Push (window xproto.Window) {
|
||||
this.XDraw()
|
||||
this.XExpPaint(window, this.Bounds().Min.X, this.Bounds().Min.Y)
|
||||
}
|
||||
|
||||
// TODO: we need to implement:
|
||||
// - cap
|
||||
// - joint
|
||||
|
||||
Reference in New Issue
Block a user