I am looking for a command-line tool for creating simple drawings on macOS. I usually need to draw some (very) simple figures/symbols. Drawing them with GUI apps like GIMP is somewhat an overkill, and I want to do it inside the terminal anyway.
The tool I am looking for can be a shell or a program. As an example, suppose I want to draw a "play" button (something like a flattened YouTube icon), I would expect something like an interpreter of:
color 255 0 0 rect 0 0 100 100 color 255 255 255 poly [10 10 10 90 90 50]
or a command like:
draw -c red -r 0 0 100 100 -c white -p 10 10 10 90 90 50
It is fine as long as I can draw elementary geometric shapes (lines, polygons and circles) and texts. Transparency support is a plus. Advanced features like layers are not necessary. A Linux port followed by a self-compilation is also fine. The software should be released under an open-source license.
Note: I am not looking for an obscure programming language interpreter (such as Braindraw). I also expect it to be fast, at least faster than transforming the above script into a valid Java program, then wait for compilation and run it. Also, I want a loseless output. Something like PNG or even BMP is OK. SVG isn't, though, because I need further format conversions.
Any help is appreciated.