added a shadow test

This commit is contained in:
Thomas Friedel 2019-04-25 17:30:38 +02:00
parent 9103dfb672
commit 3a749132e2
2 changed files with 15 additions and 0 deletions

View file

@ -569,3 +569,18 @@ func TestImagePattern(t *testing.T) {
cv.FillRect(-40, -40, 80, 80)
})
}
func TestShadow(t *testing.T) {
run(t, func(cv *canvas.Canvas) {
cv.SetFillStyle("#800")
cv.SetShadowColor("#00F")
cv.SetShadowOffset(6, 6)
cv.FillRect(10, 10, 60, 25)
cv.SetShadowBlur(6)
cv.FillRect(10, 55, 60, 25)
cv.SetFillStyle("#0F0")
cv.SetShadowColor("#F0F")
cv.SetGlobalAlpha(0.5)
cv.FillRect(50, 15, 30, 60)
})
}

BIN
testdata/Shadow.png vendored Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB