<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">I’m sorry, I was too fast.<div class=""><br class=""></div><div class="">transparency is part of MetaFun extension only.</div><div class=""><br class=""></div><div class=""><a href="http://wiki.contextgarden.net/MetaFun" class="">http://wiki.contextgarden.net/MetaFun</a></div><div class=""><br class=""></div><div class="">Samples of using of MetaFun:</div><div class=""><br class=""></div><div class=""><a href="http://www.pragma-ade.com/show-gra.pdf" class="">http://www.pragma-ade.com/show-gra.pdf</a></div><div class=""><br class=""></div><div class="">m.s.</div><div class=""><br class=""></div><div class=""><br class=""></div><div class=""><br class=""><div><blockquote type="cite" class=""><div class="">19. 7. 2016 v 14:00, Martin Sluka <<a href="mailto:martinsluka@mac.com" class="">martinsluka@mac.com</a>>:</div><br class="Apple-interchange-newline"><div class=""><div class=""><div class="">There is transparency parameter in MetaPost:</div><div class=""><br data-mce-bogus="1" class=""></div><div class=""><h2 style="color: #336644; background-image: none; margin: 1em 0px 0.6em; padding-top: 0.5em; padding-bottom: 0.1em; border: none; font-size: 18px; font-family: Verdana, 'DejaVu Sans', sans-serif; line-height: 19.5px;" data-mce-style="color: #336644; background-image: none; margin: 1em 0px 0.6em; padding-top: 0.5em; padding-bottom: 0.1em; border: none; font-size: 18px; font-family: Verdana, 'DejaVu Sans', sans-serif; line-height: 19.5px;" class=""><span class="mw-headline" id="Transparent_colors">Transparent colors </span></h2><div style="margin: 0.3em 0px 0.5em; line-height: 1.3em; font-family: Verdana, 'DejaVu Sans', sans-serif; font-size: 13px;" class="">You can use transparent colors with the <code style="background-color: #f7f7f7; font-family: 'DejaVu Sans Mono', 'Lucida Grande', 'Lucida Console', monospace;" data-mce-style="background-color: #f7f7f7; font-family: 'DejaVu Sans Mono', 'Lucida Grande', 'Lucida Console', monospace;" class="">transparent(method, factor, color)</code> function. For example:</div><pre class="tex" style="font-family: 'DejaVu Sans Mono', 'Lucida Grande', 'Lucida Console', monospace; padding: 1em; border: none; line-height: 1.5em; font-size: 0.85em; background-color: #eaf0e0; overflow: auto;" data-mce-style="font-family: 'DejaVu Sans Mono', 'Lucida Grande', 'Lucida Console', monospace; padding: 1em; border: none; line-height: 1.5em; font-size: 0.85em; background-color: #eaf0e0; overflow: auto;"><span class="cs" style="color: #0000ff;" data-mce-style="color: #0000ff;">\runMPgraphicstrue</span>
<span class="cs" style="color: #0000ff;" data-mce-style="color: #0000ff;">\setupcolors</span><span class="br" style="color: red;" data-mce-style="color: red;">[</span>state=start<span class="br" style="color: red;" data-mce-style="color: red;">]</span>
<span class="cs" style="color: #0000ff;" data-mce-style="color: #0000ff;">\starttext</span>
<span class="cs" style="color: #0000ff;" data-mce-style="color: #0000ff;">\startreusableMPgraphic</span><span class="br" style="color: red;" data-mce-style="color: red;">{</span>a<span class="br" style="color: red;" data-mce-style="color: red;">}</span>
fill unitsquare scaled 1cm withcolor yellow;
fill unitsquare shifted <span class="br" style="color: red;" data-mce-style="color: red;">(</span>0.5,0.5<span class="br" style="color: red;" data-mce-style="color: red;">)</span>
  <span class="comment" style="font-style: italic; color: #333333;" data-mce-style="font-style: italic; color: #333333;">% method 1 = normal</span>
  scaled 1cm withcolor transparent<span class="br" style="color: red;" data-mce-style="color: red;">(</span>1,0.5,red<span class="br" style="color: red;" data-mce-style="color: red;">)</span>;
<span class="cs" style="color: #0000ff;" data-mce-style="color: #0000ff;">\stopreusableMPgraphic</span>

<span class="cs" style="color: #0000ff;" data-mce-style="color: #0000ff;">\placefigure</span><span class="br" style="color: red;" data-mce-style="color: red;">[</span>force,none<span class="br" style="color: red;" data-mce-style="color: red;">]</span><span class="br" style="color: red;" data-mce-style="color: red;">{</span><span class="br" style="color: red;" data-mce-style="color: red;">}</span><span class="br" style="color: red;" data-mce-style="color: red;">{</span><span class="cs" style="color: #0000ff;" data-mce-style="color: #0000ff;">\reuseMPgraphic</span><span class="br" style="color: red;" data-mce-style="color: red;">{</span>a<span class="br" style="color: red;" data-mce-style="color: red;">}</span><span class="br" style="color: red;" data-mce-style="color: red;">}</span>
<span class="cs" style="color: #0000ff;" data-mce-style="color: #0000ff;">\stoptext</span>
</pre><img src="http://wiki.contextgarden.net/wikiteximage/b0adbcce49afb2e49c30b61d63119729.png" data-mce-src="http://wiki.contextgarden.net/wikiteximage/b0adbcce49afb2e49c30b61d63119729.png" class=""><span style="font-family: Verdana, 'DejaVu Sans', sans-serif; font-size: 13px; line-height: 19.5px;" data-mce-style="font-family: Verdana, 'DejaVu Sans', sans-serif; font-size: 13px; line-height: 19.5px;" class=""></span><div style="margin: 0.3em 0px 0.5em; line-height: 1.3em; font-family: Verdana, 'DejaVu Sans', sans-serif; font-size: 13px;" class="">The available transparency methods are the twelve methods supported by PDF specification:</div><ul style="line-height: 19.5px; list-style-type: square; margin: 0.3em 0px 0px 1.5em; padding: 0px; list-style-image: url('http://wiki.contextgarden.net/skins/contextskin/images/bullet-icon.png'); font-family: Verdana, 'DejaVu Sans', sans-serif; font-size: 13px;" data-mce-style="line-height: 19.5px; list-style-type: square; margin: 0.3em 0px 0px 1.5em; padding: 0px; list-style-image: url('http://wiki.contextgarden.net/skins/contextskin/images/bullet-icon.png'); font-family: Verdana, 'DejaVu Sans', sans-serif; font-size: 13px;" class=""><li style="margin-bottom: 0.1em;" data-mce-style="margin-bottom: 0.1em;" class="">1. normal </li><li style="margin-bottom: 0.1em;" data-mce-style="margin-bottom: 0.1em;" class="">2. multiply </li><li style="margin-bottom: 0.1em;" data-mce-style="margin-bottom: 0.1em;" class="">3. screen </li><li style="margin-bottom: 0.1em;" data-mce-style="margin-bottom: 0.1em;" class="">4. overlay</li><li style="margin-bottom: 0.1em;" data-mce-style="margin-bottom: 0.1em;" class="">5. softlight </li><li style="margin-bottom: 0.1em;" data-mce-style="margin-bottom: 0.1em;" class="">6. hardlight </li><li style="margin-bottom: 0.1em;" data-mce-style="margin-bottom: 0.1em;" class="">7. colordodge </li><li style="margin-bottom: 0.1em;" data-mce-style="margin-bottom: 0.1em;" class="">8. colorburn</li><li style="margin-bottom: 0.1em;" data-mce-style="margin-bottom: 0.1em;" class="">9. darken </li><li style="margin-bottom: 0.1em;" data-mce-style="margin-bottom: 0.1em;" class="">10. lighten </li><li style="margin-bottom: 0.1em;" data-mce-style="margin-bottom: 0.1em;" class="">11. difference </li><li style="margin-bottom: 0.1em;" data-mce-style="margin-bottom: 0.1em;" class="">12. exclusion</li><li class=""></li></ul></div><div class=""><br class="">On Jul 19, 2016, at 12:25 PM, Robert Staven <<a href="mailto:robert@staven.no" class="">robert@staven.no</a>> wrote:<br class=""><br class=""></div><div class=""><blockquote type="cite" class=""><div class="msg-quote"><div class="_stretch"><span class="body-text-content">Hi,<br class=""><br class="">I'm using Therion to map waterfilled caves, and some systems have <br class="">'air-locks' (air chambers), so it's necessary to distinguish between air <br class="">filled cave, waterfilled cave and water surfaces. But the waterfilled <br class="">area should show details (be transparent) in same way as dry cave.<br class=""><br class="">Is there any way to adjust the opacity value (in meta code?) when <br class="">setting a transparent color?<br class=""><br class=""><br class="">I have made a test to show my issues:<br class="">The files can be found on <a href="http://www.staven.no/cavetest/" data-mce-href="http://www.staven.no/cavetest/" class="">http://www.staven.no/cavetest/</a><br class=""><br class=""><br class="">The cave (ca 100m long)<br class="">plan:<br class="">-> <a href="http://www.staven.no/cavetest/testcave_plan.pdf" data-mce-href="http://www.staven.no/cavetest/testcave_plan.pdf" class="">http://www.staven.no/cavetest/testcave_plan.pdf</a><br class="">elevation:<br class="">-> <a href="http://www.staven.no/cavetest/testcave_elevation.pdf" data-mce-href="http://www.staven.no/cavetest/testcave_elevation.pdf" class="">http://www.staven.no/cavetest/testcave_elevation.pdf</a><br class=""><br class="">This doesn't work to well draw underwater maps.<br class=""><br class=""><br class="">*** Changing the water color:<br class=""><br class="">layout test<br class=""> code metapost<br class=""><br class=""> def a_water (expr p) =<br class=""> T:=identity;<br class=""> thfill p withcolor (0.8, 0.8, 1.0);<br class=""> enddef;<br class=""><br class=""> endcode<br class="">endlayout<br class=""><br class="">-> <a href="http://www.staven.no/cavetest/testcave_elevation_2.pdf" data-mce-href="http://www.staven.no/cavetest/testcave_elevation_2.pdf" class="">http://www.staven.no/cavetest/testcave_elevation_2.pdf</a><br class=""><br class="">Looks better but the cave and line 'behind' doesn't show thru the water.<br class=""><br class=""><br class="">*** Try with transparent water color:<br class=""><br class=""> def_transparent_rgb(tr_lblue, 0.80, 0.80, 1.00);<br class=""><br class=""> def a_water (expr p) =<br class=""> T:=identity;<br class=""> thfill p withtransparentcolor tr_lblue;<br class=""> enddef;<br class=""><br class="">-> <a href="http://www.staven.no/cavetest/testcave_elevation_3.pdf" data-mce-href="http://www.staven.no/cavetest/testcave_elevation_3.pdf" class="">http://www.staven.no/cavetest/testcave_elevation_3.pdf</a><br class=""><br class=""><br class="">*** Almost perfect, but I like to adjust the opacity value so it looks <br class="">like this:<br class=""><br class=""> def a_water (expr p) =<br class=""> T:=identity;<br class=""> enddef;<br class=""> # no drawing of water<br class=""><br class=""> color map-fg [80 80 100]<br class=""><br class="">-> <a href="http://www.staven.no/cavetest/testcave_elevation_4.pdf" data-mce-href="http://www.staven.no/cavetest/testcave_elevation_4.pdf" class="">http://www.staven.no/cavetest/testcave_elevation_4.pdf</a><br class="">(NB You won't see the difference in Adobe Reader, but it shows up in <br class="">SumatraPDF)<br class=""><br class=""><br class="">Is there any way to adjust the opacity value when setting a transparent <br class="">color?<br class=""><br class="">Or should I do this another way?<br class="">_______________________________________________<br class="">Therion mailing list<br class=""><a href="mailto:Therion@speleo.sk" data-mce-href="mailto:Therion@speleo.sk" class="">Therion@speleo.sk</a><br class=""><a href="http://mailman.speleo.sk/listinfo/therion" data-mce-href="http://mailman.speleo.sk/listinfo/therion" class="">http://mailman.speleo.sk/listinfo/therion</a><br class=""></span></div></div></blockquote></div></div></div></blockquote></div><br class=""></div></body></html>