minor changes
This commit is contained in:
parent
d598e68c03
commit
7f7912cc16
2
batch.go
2
batch.go
|
@ -128,7 +128,7 @@ func (bp *batchPicture) Slice(r Rect) Picture {
|
||||||
func (bp *batchPicture) Draw(t TargetTriangles) {
|
func (bp *batchPicture) Draw(t TargetTriangles) {
|
||||||
bt := t.(*batchTriangles)
|
bt := t.(*batchTriangles)
|
||||||
if bp.b != bt.b {
|
if bp.b != bt.b {
|
||||||
panic(fmt.Sprintf("%T.Draw: TargetTriangles generated by different Batch", bp))
|
panic(fmt.Errorf("%T.Draw: TargetTriangles generated by different Batch", bp))
|
||||||
}
|
}
|
||||||
bt.draw(bp)
|
bt.draw(bp)
|
||||||
}
|
}
|
||||||
|
|
|
@ -127,7 +127,7 @@ type TargetPicture interface {
|
||||||
// PictureColor specifies Picture with Color property, so that every position inside the Picture's
|
// PictureColor specifies Picture with Color property, so that every position inside the Picture's
|
||||||
// Bounds has a color.
|
// Bounds has a color.
|
||||||
//
|
//
|
||||||
// Positions outside the Picture's Bounds must return opaque white (NRGBA{R: 1, G: 1, B:1, A: 1}).
|
// Positions outside the Picture's Bounds must return transparent black (NRGBA{R: 0, G: 0, B: 0, A: 0}).
|
||||||
type PictureColor interface {
|
type PictureColor interface {
|
||||||
Picture
|
Picture
|
||||||
Color(at Vec) NRGBA
|
Color(at Vec) NRGBA
|
||||||
|
|
Loading…
Reference in New Issue