19 lines
361 B
Nim
19 lines
361 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("tests/images/png/baboon.png")
|
|
paint.imageMat = scale(vec2(0.08, 0.08))
|
|
|
|
image.fillPath(path, paint)
|
|
image.writeFile("examples/image_tiled.png")
|