Color fill graphics composed in Scheme

There is a very helpful note on Composing TeXmacs graphics with Scheme in the TeXmacs notes blog (thanks a lot to @pireddag for writing it), which helped me a lot to get started with figures.

At the end of this note, there is an outline (cline) filled with yellow, but I can’t find any documentation how to do it.
This post here in the forum mentions the Scheme primitive (graphics-set-fill-color "#4EABE8"), but I’m lacking experience how to combine it with, for example, the cline primitive.

I’d be very happy for any hint towards any documentation on composing graphics in TeXmacs with Scheme. (I have of course also found Modular Scheme Graphics).

Rather than going through the TeXmacs version of my post, I have drawn a closed spline filled with yellow, I switched to source mode and copied it to Scheme. Here is what I have in my clipboard:

(with "fill-color" "yellow" (cspline (point "-4.80386" "1.936") (point "-3.25868170392909" "0.750661463156502") (point "-2.64484389469507" "2.10533800767297")))

In the Scheme developer guide Chapter 5 describes the “Scheme interface for the graphical mode”, but I only looked through it quickly—it is sophisticated.

There is a nice chapter in the Jolly Writer on the WYSIWYG interface, which in my opinion would benefit from a few more features (alignment and distribution and maybe more).
On the other hand, programming graphics via Scheme can be fun.

2 Likes

Thanks a lot @pireddag like always, this information is very helpful!
Alignment and distribution would be very helpful features indeed.
I appreciate programming graphics a lot for reproducibility: It’s easier for sharing with others and version control.

2 Likes