Hi metapost wizards, I try to fill a label with the page background. thfill ((bbox lab)) scaled (sc * basescale * 1.5) withcolor <insertColorHere>; For <insertColorHere> i tried "label_fill_color", which however may be a different background. I also tried "background", but that yields the cave passage background colour. In which variable do i access the page's background color (the one set wit the layout option "map-bg")? Thanks! Beni
In which variable do i access the page's background color (the one set wit the layout option "map-bg")?
Fun fact ... you can't access that. Or at least, it didn't seem to be available back when I was trying to do that in version 5. And I still can't see any useful variable in version 6. "background" is the default background (white) in v5, but even that is absent in v6. I tested like this with identical input using the -d switch to get the data.mp: 1. color map-bg [100 100 0] # yellow 2. color map-bg [100 0 0] # red The data.mp debugging output was identical in both cases, so it is not putting the colour into a variable in that file. In places where I have needed this, my layout included a "code metapost" which set a global variable where I specified the background colour (written in metapost notation this time). The symbol code could then read my global variable. Messy solution.
On Tue, Nov 23, 2021 at 4:34 PM Tarquin Wilton-Jones via Therion <therion@speleo.sk> wrote:
In which variable do i access the page's background color (the one set wit the layout option "map-bg")?
Fun fact ... you can't access that. Or at least, it didn't seem to be available back when I was trying to do that in version 5. And I still can't see any useful variable in version 6.
Hi, it's now set as MapBackground in the latest commit. M.
On 23/11/2021 20:35, Martin Budaj wrote:
On Tue, Nov 23, 2021 at 4:34 PM Tarquin Wilton-Jones via Therion <therion@speleo.sk> wrote:
In which variable do i access the page's background color (the one set wit the layout option "map-bg")?
Fun fact ... you can't access that. Or at least, it didn't seem to be available back when I was trying to do that in version 5. And I still can't see any useful variable in version 6.
Hi,
it's now set as MapBackground in the latest commit.
Woohoo! What service :) Thank you kind sir.
Great, that works as intended! Thank you very much! Am 2021-11-23 21:35, schrieb Martin Budaj:
On Tue, Nov 23, 2021 at 4:34 PM Tarquin Wilton-Jones via Therion <therion@speleo.sk> wrote:
In which variable do i access the page's background color (the one set wit the layout option "map-bg")?
Fun fact ... you can't access that. Or at least, it didn't seem to be available back when I was trying to do that in version 5. And I still can't see any useful variable in version 6.
Hi,
it's now set as MapBackground in the latest commit.
M. _______________________________________________ Therion mailing list Therion@speleo.sk https://mailman.speleo.sk/listinfo/therion
participants (3)
-
Benedikt Hallinger -
Martin Budaj -
Tarquin Wilton-Jones