On Tue, Apr 23, 2024 at 08:47:00PM +0800, Qian Yun wrote:
> This is the final piece of my fixes to PS output.
>
> As discussed in previous thread, this patch enables title to
> be shown in PS format output.
>
> But I did not add a option to enable/disable the drawing of
> frame over viewWindow and titleWindow. First, this feature
> does not exist for the screen output or bitmap output.
> Second, this requires rather extensive changes, including
> adding support on the SPAD side. Third, this looks like
> a debugging feature to me. So I leave this portion of code
> under "#if 0".
OK
> Some side notes: it looks like the PS related functions
> are modeled after X11 APIs. It looks like it was designed
> with mono color at first, then added some color support,
> but incomplete. Some other parts also looks like unfinished
> or unpolished. Also the PS functions are too tightly tangled
> with X11 logic, so it is too difficult to make the generation
> of PS free of X11 dependency.
Well, there are two things:
a) generate PS without connection to X server
b) compile PS output without X headers and libraries
For a) I do not think that "tightly tangled with X11 logic" is
a big problem. Concerning b), once a) is done b) would be
not difficult, just some tedious work: basically replace X11
hunks and PS hunks by separate functions and collect new functition
in appropriate files. Or, less elegant but possibly less work,
just put appropiates C preprocessor conditional around each hunk.
> About next steps:
>
> First is to use those generated PS images for the book.
> I currently used a hack in htinp.c to generate PS image,
AFAICS this is "approved method", not a hack: since this is _build_
property kind of output is hardcoded into 'htinp.c'.
--
Waldek Hebisch