drawim

Simple library to draw stuff on a window


Keywords
draw, drawing, gamedev, canvas, nim
License
MIT
Install
nimble install drawim

Documentation

Drawim

A simple drawing library in Nim, inspired by p5js. Builds to native, using OpenGL, and to JavaScript, using HTML5 Canvas.

Usage

A simple example, to draw a rectangle:

import drawim

proc draw() =
  background(0)
  fill(255, 0, 0)
  translate(int(width / 2), int(height / 2))
  rectFill(-100,-100,100,100)

run(600, 400, draw)

More examples can be found on examples/ folder.

Documentation

You can find the full docs here