Re: setting "enhanced" for individual elements of a plot

Jeremy Nicoll - ml gnuplot <[email protected]> Sat, 10 May 2025 09:46:16 +0100
Newsgroups gmane.comp.graphics.gnuplot.devel
Message-ID <[email protected]>
On 2025-05-09 00:47, Ethan A Merritt wrote:

> As it stands now, the terminal driver API provides only one entry point 
> for
> sending text.  When the terminal is initialized, this entry point is 
> either
> set to the enhanced text routine or to the plain text routine.
> The "noenhanced" attribute works by temporarily setting a global flag
> that can be seen by the terminal's enhanced text routine [see below].
> If the flag is set, the terminal just ignores all the markup 
> characters.
> Going the other way is I suppose possible, but would require new code
> in the plain text routine that knows to check some flag or other global
> condition and redirect the call to the enhanced text routine instead,
> possibly having to deal with initiallization of state variables
> (mostly font-related stuff) that would otherwise have been done
> when the terminal was first set to enhanced text mode.

If the state vars are only used by the enhanced mode then maybe you 
could
sometimes initialise the terminal twice?  That is, first always 
initialise
the enhanced routine (to do the font stuff etc), then as if that had not
been done (but only if noenhanced was set initially) initialise the 
plain
text routine?  Would that leave plain-text in effect exactly as it works
now, but mean that temporary switches into enhanced would work?


-- 
Jeremy Nicoll - my opinions are my own


_______________________________________________
gnuplot-beta mailing list
[email protected]
Membership management via: https://lists.sourceforge.net/lists/listinfo/gnuplot-beta