diff --git a/experiments/trapezoid.nim b/experiments/trapezoid.nim index e99b589..1e13226 100644 --- a/experiments/trapezoid.nim +++ b/experiments/trapezoid.nim @@ -27,7 +27,7 @@ proc roundBy*(v: Vec2, n: float32): Vec2 {.inline.} = proc pathToTrapezoids(p: Path): seq[Trapezoid] = - var polygons = p.commands.commandsToPolygons() + var polygons = p.commandsToShapes() const q = 1/256.0 @@ -179,7 +179,7 @@ block: var image = newImage(200, 200) image.fill(rgba(255, 255, 255, 255)) - var p = newPath() + var p: Path p.moveTo(50, 50) p.lineTo(50, 150) p.lineTo(150, 150) @@ -189,7 +189,7 @@ block: var trapezoids = p.pathToTrapezoids() image.drawTrapezoids(trapezoids) - image.writeFile("trapezoids/rect.png") + image.writeFile("experiments/trapezoids/rect.png") block: # Rhombus @@ -197,7 +197,7 @@ block: var image = newImage(200, 200) image.fill(rgba(255, 255, 255, 255)) - var p = newPath() + var p: Path p.moveTo(100, 50) p.lineTo(150, 100) p.lineTo(100, 150) @@ -207,7 +207,7 @@ block: var trapezoids = p.pathToTrapezoids() image.drawTrapezoids(trapezoids) - image.writeFile("trapezoids/rhombus.png") + image.writeFile("experiments/trapezoids/rhombus.png") block: # heart @@ -223,7 +223,7 @@ block: var trapezoids = p.pathToTrapezoids() image.drawTrapezoids(trapezoids) - image.writeFile("trapezoids/heart.png") + image.writeFile("experiments/trapezoids/heart.png") block: # l @@ -240,7 +240,7 @@ block: var trapezoids = p.pathToTrapezoids() image.drawTrapezoids(trapezoids) - image.writeFile("trapezoids/l.png") + image.writeFile("experiments/trapezoids/l.png") block: # g @@ -257,4 +257,4 @@ block: var trapezoids = p.pathToTrapezoids() image.drawTrapezoids(trapezoids) - image.writeFile("trapezoids/g.png") + image.writeFile("experiments/trapezoids/g.png") diff --git a/experiments/trapezoids/g.png b/experiments/trapezoids/g.png index c63be15..fbfafa0 100644 Binary files a/experiments/trapezoids/g.png and b/experiments/trapezoids/g.png differ diff --git a/experiments/trapezoids/heart.png b/experiments/trapezoids/heart.png index 2a5f69b..88c6649 100644 Binary files a/experiments/trapezoids/heart.png and b/experiments/trapezoids/heart.png differ diff --git a/experiments/trapezoids/l.png b/experiments/trapezoids/l.png index 0507a7f..1c88543 100644 Binary files a/experiments/trapezoids/l.png and b/experiments/trapezoids/l.png differ diff --git a/pixie.nimble b/pixie.nimble index fcb7418..8fe5f3f 100644 --- a/pixie.nimble +++ b/pixie.nimble @@ -11,4 +11,4 @@ requires "chroma >= 0.2.1" requires "zippy >= 0.3.5" requires "flatty >= 0.1.3" requires "nimsimd >= 1.0.0" -requires "bumpy >= 1.0.1" +requires "bumpy >= 1.0.2"