add scale draw test
This commit is contained in:
parent
e16fcb595d
commit
848a051310
2 changed files with 10 additions and 0 deletions
BIN
tests/images/scaleHalf.png
Normal file
BIN
tests/images/scaleHalf.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 8.4 KiB |
|
@ -117,3 +117,13 @@ block:
|
|||
ctx.image.fill(rgba(0, 255, 255, 255))
|
||||
ctx.strokePolygon(vec2(50, 50), 30, 6)
|
||||
ctx.image.writeFile("tests/images/strokePolygon.png")
|
||||
|
||||
block:
|
||||
let
|
||||
a = newImage(1000, 1000)
|
||||
b = newImage(500, 500)
|
||||
a.fill(rgba(255, 0, 0, 255))
|
||||
b.fill(rgba(0, 255, 0, 255))
|
||||
|
||||
a.draw(b, translate(vec2(250, 250)) * scale(vec2(0.5, 0.5)))
|
||||
a.writeFile("tests/images/scaleHalf.png")
|
||||
|
|
Loading…
Reference in a new issue