SVG vector graphics added

28 views
Skip to first unread message

The Beez

unread,
Apr 29, 2023, 8:55:47 AM4/29/23
to 4tH-compiler
Hi 4tH-ers!

I've collaborated with the author of the original PMM graphics package to create an SVG set of libraries. It is available in SVN now! Note this is all minutes away, so you might find some bugs in there, testing is continuing.

The best part of all may be: it's largely compatible with the graphics library! So, if you ever created a graphics program of your own, you may convert it in just a few minutes!

Yes, it has pixel plotting as well! You may use either dots or pixels by using the commands "DOTS" or "PIXELS"!

The only changes you might have to make are:

SVGopen ( a n -- f) - TRUE flags mean an error
SVGclose ( --)

CANVAS (w h --) - no, setting pic_height or pic_width doesn't do it
WHITEOUT (n --) - takes a color, like WHITE WHITEOUT
COLOR  ( n --) - so instead of WHITE you write WHITE COLOR

Note the COLOR and CANVAS are optionally available in PPM graphics as well.

Yes, 3D graphics are available too, Turtle as well, GBANNER works as advertised. The only thing lacking at the moment are circle arcs.

There is also support for SVG polygons and polylines. We hope you enjoy this addition and let us know what you think!

Hans Bezemer
Reply all
Reply to author
Forward
0 new messages