2021-02-18 19:39:11 +00:00
|
|
|
import pixie
|
2021-02-18 18:14:55 +00:00
|
|
|
|
2021-02-18 19:55:26 +00:00
|
|
|
let image = newImage(200, 200)
|
2021-02-18 18:14:55 +00:00
|
|
|
image.fill(rgba(255, 255, 255, 255))
|
|
|
|
|
2021-05-21 04:48:59 +00:00
|
|
|
let ctx = newContext(image)
|
|
|
|
ctx.strokeStyle = "#FF5C00"
|
|
|
|
ctx.lineWidth = 10
|
|
|
|
|
2021-02-18 19:55:26 +00:00
|
|
|
let
|
|
|
|
start = vec2(25, 25)
|
|
|
|
stop = vec2(175, 175)
|
2021-02-18 18:14:55 +00:00
|
|
|
|
2021-05-21 04:48:59 +00:00
|
|
|
ctx.strokeSegment(segment(start, stop))
|
2021-02-18 18:14:55 +00:00
|
|
|
|
|
|
|
image.writeFile("examples/line.png")
|