vector: add test for StrokeRect with AA

Updates #3270
This commit is contained in:
Hajime Hoshi
2025-07-15 23:47:22 +09:00
parent 4f6ca3e704
commit 96d4c2ba61

View File

@@ -35,3 +35,12 @@ func TestLine0(t *testing.T) {
t.Errorf("got: %v, want: %v", got, want)
}
}
// Issue #3270
func TestStrokeRectAntiAlias(t *testing.T) {
dst := ebiten.NewImage(16, 16)
vector.StrokeRect(dst, 0, 0, 16, 16, 2, color.White, true)
if got, want := dst.At(5, 5), (color.RGBA{}); got != want {
t.Errorf("got: %v, want: %v", got, want)
}
}