[Therion] Adjust opacity value in transparent color
Martin Budaj
m.budaj at gmail.com
Tue Jul 19 22:01:03 CEST 2016
Hi,
there is just one global setting "opacity" in the layout (70 % by
default). Global means, that the same transparency value is applied to
passage fills and to all areas filled using "withtransparentcolor".
The reason is that therion draws all transparent areas in a scrap in
one group (see https://mailman.speleo.sk/pipermail/therion/2012-November/004113.html
for details) to avoid overlaps of transparent areas in the same scrap
or transparent rendering of features in the same scrap which are
bellow the transparent area and should be hidden.
Given this, your examples 3 and 4 should give the same visual results
and Adobe Reader is displaying them right.
Martin
On Tue, Jul 19, 2016 at 12:25 PM, Robert Staven <robert at staven.no> wrote:
> 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?
> _______________________________________________
> Therion mailing list
> Therion at speleo.sk
> http://mailman.speleo.sk/listinfo/therion
More information about the Therion
mailing list