or (canvasD)
A Graphics library written in D Programming language.
You can get source code of canvasD from running the following command
git clone https://github.com/kerem3338/canvasd
here's a example of a simple program which creates a 100x100 size canvas and fills with red color
import canvas;
import std.file;
void main() {
Canvas canvas = new Canvas(100,100);
canvas.fill(Colors.red);
std.file.write("example.ppm",canvas.getPPM());
}
You can compile to example code with following command.
dmd canvas.d <filename>.d
If you curious and ask why PPM?
, don't forget you can use ffmpeg to convert into another image format
You can generate documentation for canvasD using Doxygen
Please keep in mind, i'm not a very good programmer.