18 lines
358 B
Nim
18 lines
358 B
Nim
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 paint = newPaint(pkImageTiled)
|
|
paint.image = readImage("examples/data/baboon.png")
|
|
paint.imageMat = scale(vec2(0.08, 0.08))
|
|
|
|
image.fillPath(path, paint)
|
|
image.writeFile("examples/image_tiled.png")
|