mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-12-26 03:38:55 +01:00
graphics: Add TestImageZeroSizedMipmap
This commit is contained in:
parent
6022d8856e
commit
4ab97ad250
@ -1670,3 +1670,13 @@ func TestImageTooSmallMipmap(t *testing.T) {
|
|||||||
t.Errorf("got: %v, want: %v", got, want)
|
t.Errorf("got: %v, want: %v", got, want)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func TestImageZeroSizedMipmap(t *testing.T) {
|
||||||
|
const w, h = 16, 16
|
||||||
|
src, _ := NewImage(w, h, FilterDefault)
|
||||||
|
dst, _ := NewImage(w, h, FilterDefault)
|
||||||
|
|
||||||
|
op := &DrawImageOptions{}
|
||||||
|
op.Filter = FilterLinear
|
||||||
|
dst.DrawImage(src.SubImage(image.ZR).(*Image), op)
|
||||||
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user