small gen_readme stuff

This commit is contained in:
Ryan Oldenburg 2021-09-07 21:13:36 -05:00
parent 4147663b4a
commit 234ea08e3d
2 changed files with 5 additions and 10 deletions

View file

@ -3,16 +3,11 @@ import pixie
let image = newImage(200, 200)
image.fill(rgba(255, 255, 255, 255))
let path = newPath()
path.polygon(vec2(100, 100), 70, sides = 8)
let polygonImage = newImage(200, 200)
let ctx = newContext(polygonImage)
ctx.fillStyle = rgba(255, 255, 255, 255)
ctx.fillPolygon(
vec2(100, 100),
70,
sides = 8
)
polygonImage.fillPath(path, rgba(255, 255, 255, 255))
let shadow = polygonImage.shadow(
offset = vec2(2, 2),

View file

@ -26,7 +26,7 @@ var exampleFiles = [
]
for path in exampleFiles:
discard execCmd("nim c -r -d:danger " & path)
discard execCmd("nim c -r " & path)
let code = readFile(path)
let innerCode = code.cutBetween("image.fill(rgba(255, 255, 255, 255))", "image.writeFile")
if innerCode != "":