[Therion] Adjust opacity value in transparent color
Robert Staven
robert at staven.no
Tue Jul 19 12:25:43 CEST 2016
Hi,
I'm using Therion to map waterfilled caves, and some systems have
'air-locks' (air chambers), so it's necessary to distinguish between air
filled cave, waterfilled cave and water surfaces. But the waterfilled
area should show details (be transparent) in same way as dry cave.
Is there any way to adjust the opacity value (in meta code?) when
setting a transparent color?
I have made a test to show my issues:
The files can be found on http://www.staven.no/cavetest/
The cave (ca 100m long)
plan:
-> http://www.staven.no/cavetest/testcave_plan.pdf
elevation:
-> http://www.staven.no/cavetest/testcave_elevation.pdf
This doesn't work to well draw underwater maps.
*** Changing the water color:
layout test
code metapost
def a_water (expr p) =
T:=identity;
thfill p withcolor (0.8, 0.8, 1.0);
enddef;
endcode
endlayout
-> http://www.staven.no/cavetest/testcave_elevation_2.pdf
Looks better but the cave and line 'behind' doesn't show thru the water.
*** Try with transparent water color:
def_transparent_rgb(tr_lblue, 0.80, 0.80, 1.00);
def a_water (expr p) =
T:=identity;
thfill p withtransparentcolor tr_lblue;
enddef;
-> http://www.staven.no/cavetest/testcave_elevation_3.pdf
*** Almost perfect, but I like to adjust the opacity value so it looks
like this:
def a_water (expr p) =
T:=identity;
enddef;
# no drawing of water
color map-fg [80 80 100]
-> http://www.staven.no/cavetest/testcave_elevation_4.pdf
(NB You won't see the difference in Adobe Reader, but it shows up in
SumatraPDF)
Is there any way to adjust the opacity value when setting a transparent
color?
Or should I do this another way?
More information about the Therion
mailing list