more and better tests
This commit is contained in:
parent
461d713fc1
commit
9f8f8af492
1 changed files with 49 additions and 1 deletions
|
@ -45,7 +45,7 @@ block: # Basic rect
|
|||
|
||||
block: # Rounded rect
|
||||
let path = newPath()
|
||||
path.roundedRect(rect(0, 0, 900, 900), 20, 20, 20, 20)
|
||||
path.roundedRect(rect(0, 0, 900, 900), 100, 100, 100, 100)
|
||||
|
||||
let shapes = path.commandsToShapes(true, 1)
|
||||
|
||||
|
@ -67,6 +67,54 @@ block: # Rounded rect
|
|||
windingRule: NonZero
|
||||
)]))
|
||||
|
||||
block: # Pentagon
|
||||
let path = newPath()
|
||||
path.polygon(vec2(450, 450), 400, 5)
|
||||
|
||||
let shapes = path.commandsToShapes(true, 1)
|
||||
|
||||
benchmarks.add(Benchmark(
|
||||
name: "pentagon opaque",
|
||||
fills: @[Fill(
|
||||
shapes: shapes,
|
||||
transform: mat3(),
|
||||
paint: opaque,
|
||||
windingRule: NonZero
|
||||
)]))
|
||||
|
||||
benchmarks.add(Benchmark(
|
||||
name: "pentagon not opaque",
|
||||
fills: @[Fill(
|
||||
shapes: shapes,
|
||||
transform: mat3(),
|
||||
paint: notOpaque,
|
||||
windingRule: NonZero
|
||||
)]))
|
||||
|
||||
block: # Circle
|
||||
let path = newPath()
|
||||
path.circle(circle(vec2(450, 450), 400))
|
||||
|
||||
let shapes = path.commandsToShapes(true, 1)
|
||||
|
||||
benchmarks.add(Benchmark(
|
||||
name: "circle opaque",
|
||||
fills: @[Fill(
|
||||
shapes: shapes,
|
||||
transform: mat3(),
|
||||
paint: opaque,
|
||||
windingRule: NonZero
|
||||
)]))
|
||||
|
||||
benchmarks.add(Benchmark(
|
||||
name: "circle not opaque",
|
||||
fills: @[Fill(
|
||||
shapes: shapes,
|
||||
transform: mat3(),
|
||||
paint: notOpaque,
|
||||
windingRule: NonZero
|
||||
)]))
|
||||
|
||||
block: # Heart
|
||||
let path = parsePath("""
|
||||
M 100,300
|
||||
|
|
Loading…
Reference in a new issue