test_paints
This commit is contained in:
parent
c028f82af5
commit
6699dabbb4
|
@ -1,4 +1,4 @@
|
|||
import chroma, pixie, vmath
|
||||
import chroma, pixie, vmath, utils
|
||||
|
||||
const heartShape = """
|
||||
M 10,30
|
||||
|
@ -14,7 +14,7 @@ block:
|
|||
heartShape,
|
||||
rgba(255, 0, 0, 255)
|
||||
)
|
||||
image.writeFile("tests/paths/paintSolid.png")
|
||||
image.diffVs("tests/paths/paintSolid.png")
|
||||
|
||||
block:
|
||||
let paint = newPaint(ImagePaint)
|
||||
|
@ -23,7 +23,7 @@ block:
|
|||
|
||||
let image = newImage(100, 100)
|
||||
image.fillPath(heartShape, paint)
|
||||
image.writeFile("tests/paths/paintImage.png")
|
||||
image.diffVs("tests/paths/paintImage.png")
|
||||
|
||||
block:
|
||||
let paint = newPaint(ImagePaint)
|
||||
|
@ -33,7 +33,7 @@ block:
|
|||
|
||||
let image = newImage(100, 100)
|
||||
image.fillPath(heartShape, paint)
|
||||
image.writeFile("tests/paths/paintImageOpacity.png")
|
||||
image.diffVs("tests/paths/paintImageOpacity.png")
|
||||
|
||||
block:
|
||||
let paint = newPaint(TiledImagePaint)
|
||||
|
@ -42,7 +42,7 @@ block:
|
|||
|
||||
let image = newImage(100, 100)
|
||||
image.fillPath(heartShape, paint)
|
||||
image.writeFile("tests/paths/paintImageTiled.png")
|
||||
image.diffVs("tests/paths/paintImageTiled.png")
|
||||
|
||||
block:
|
||||
let paint = newPaint(TiledImagePaint)
|
||||
|
@ -52,7 +52,7 @@ block:
|
|||
|
||||
let image = newImage(100, 100)
|
||||
image.fillPath(heartShape, paint)
|
||||
image.writeFile("tests/paths/paintImageTiledOpacity.png")
|
||||
image.diffVs("tests/paths/paintImageTiledOpacity.png")
|
||||
|
||||
block:
|
||||
let paint = newPaint(LinearGradientPaint)
|
||||
|
@ -67,7 +67,7 @@ block:
|
|||
|
||||
let image = newImage(100, 100)
|
||||
image.fillPath(heartShape, paint)
|
||||
image.writeFile("tests/paths/gradientLinear.png")
|
||||
image.diffVs("tests/paths/gradientLinear.png")
|
||||
|
||||
block:
|
||||
let paint = newPaint(LinearGradientPaint)
|
||||
|
@ -82,7 +82,7 @@ block:
|
|||
|
||||
let image = newImage(100, 100)
|
||||
image.fillPath(heartShape, paint)
|
||||
image.writeFile("tests/paths/gradientLinear2.png")
|
||||
image.diffVs("tests/paths/gradientLinear2.png")
|
||||
|
||||
block:
|
||||
let paint = newPaint(RadialGradientPaint)
|
||||
|
@ -98,7 +98,7 @@ block:
|
|||
|
||||
let image = newImage(100, 100)
|
||||
image.fillPath(heartShape, paint)
|
||||
image.writeFile("tests/paths/gradientRadial.png")
|
||||
image.diffVs("tests/paths/gradientRadial.png")
|
||||
|
||||
block:
|
||||
let paint = newPaint(AngularGradientPaint)
|
||||
|
@ -114,7 +114,7 @@ block:
|
|||
|
||||
let image = newImage(100, 100)
|
||||
image.fillPath(heartShape, paint)
|
||||
image.writeFile("tests/paths/gradientAngular.png")
|
||||
image.diffVs("tests/paths/gradientAngular.png")
|
||||
|
||||
block:
|
||||
let paint = newPaint(AngularGradientPaint)
|
||||
|
@ -131,4 +131,4 @@ block:
|
|||
|
||||
let image = newImage(100, 100)
|
||||
image.fillPath(heartShape, paint)
|
||||
image.writeFile("tests/paths/gradientAngularOpacity.png")
|
||||
image.diffVs("tests/paths/gradientAngularOpacity.png")
|
||||
|
|
Loading…
Reference in a new issue