Re: [Therion] Therion 6.0.1 colour processing problem

2021-08-23 Thread Martin Budaj
Hi,

if really needed, windows installer for 5.5.7 could be compiled (we don't
store old installers on the server; installers for releases starting with
6.0.0 are stored on Github). But I suggest that it's better to fix the data
than to stick with an old version of the software which won't get any fixes
in the future.

The required changes to symbol definitions are simple:

- delete all occurences of 'def_transparent_rgb' macro with its argument,
e.g.
def_transparent_rgb(tr_lgrey, 0.73, 0.71, 0.75);

- replace all occurences of 'withtransparentcolor' and its argument with
'withalpha' + color and alpha values, e.g.
   thfill P withtransparentcolor tr_lgrey;
   should be changed to
   thfill P withcolor (0.73, 0.71, 0.75) withalpha 0.7;

If there is still a problem processing your data, please send me (or to the
list) an example and the corresponding log file.

Cheers
Martin




On Sun, Aug 22, 2021 at 10:44 PM A.M. van Rosmalen 
wrote:

> Thank you for your answer Martin!
>
> Where can I find the installer of a previous version of Therion?
>
> The latest version undoubtedly is absolutely awesome, but it also messes
> up my maps and two days of trying just convinced me I'm simply too
> uninterested in new features or too stupid to fix something that wasn't
> broken to begin with.
>
> Cheers,
>
> Anton
>
>
> Op za 21 aug. 2021 om 18:37 schreef Martin Budaj 
>
>> Hi,
>>
>> the problem is caused by an incompatible change in transparent colours
>> handling introduced in 6.0.0 (see
>> https://github.com/therion/therion/blob/master/CHANGES):
>>
>> incompatible changes: the drawing option 'withtransparentcolor',
>> macro 'def_transparent_rgb' and predefined transparent colors tr_bg,
>> tr_white, tr_black were removed;
>> use the drawing option 'withcolor  withalpha ' instead
>>
>> This allows you to use transparency without defining transparent colours
>> in advance, but you need to rewrite your metapost definitions.
>>
>> The issue on page 57 mentioned by Bruce is not related to this change
>> (I'll add a clarification to the thbook).
>>
>> Martin
>>
>> On Sat, Aug 21, 2021 at 10:57 AM Bruce Mutton  wrote:
>>
>>> Anton
>>>
>>> It seems my current version of that file/layout doesn’t use transparent
>>> colours – I haven’t updated that wiki post for some years.
>>>
>>>
>>>
>>> I vaguely recall some discussion about transparent colours when
>>> differing colour models were introduced, but such things are above my
>>> knowledge level.
>>>
>>> A clue on top of page 57 of the Therion book.
>>>
>>>
>>>
>>> smooth-shading  . set the mode of smooth scrap backgroud
>>> shading.
>>> By default, altidute and depth colour is interpolated across the scrap
>>> the quick way.
>>> Some issues are present if transparent symbol colours are used. More
>>> precise modes
>>> should be added in the future. If off, scrap is filled with single
>>> colour.
>>>
>>>
>>>
>>> On the other hand, your code is missing a ;
>>>
>>> What happens if you add one like this?
>>>
>>> def_transparent_rgb (tr_color_sump_bg, .44, .81, .92)*;*
>>> %transparent version
>>>
>>>
>>>
>>> Or you could just delete the entire line, assuming you have not used
>>> tr_color_sump anywhere.
>>>
>>>
>>>
>>> Hope that helps.
>>>
>>> Bruce
>>>
>>>
>>>
>>>
>>>
>>> *From:* Therion  *On Behalf Of *A.M. van
>>> Rosmalen
>>> *Sent:* Saturday, 21 August 2021 19:53
>>> *To:* List for Therion users 
>>> *Subject:* [Therion] Therion 6.0.1 colour processing problem
>>>
>>>
>>>
>>> Hi there,
>>>
>>>
>>> Since I upgraded to the last version of Therion (6.01) on Windows my
>>> maps refuse to compile even though they used to compile just fine
>>> before and still compile under the previous version (on a Linux
>>> machine)
>>>
>>> Specifically this piece of code in LayoutStandards.thc drafted by
>>> Bruce Mutton found here:
>>> https://therion.speleo.sk/wiki/_media/templates:layoutstandards.txt
>>>
>>>   code metapost
>>>   %these colours affect fills, not the linework
>>> !color colour_water_bg; %! forces interpretation as metapost
>>> colour_water_bg := (0.82,.93,.95);  %light blue
>>> !color colour_sump_bg;  %! forces interpretation as metapost
>>> def_transparent_rgb (tr_color_sump_bg, .44, .81, .92) %transparent
>>> version
>>> colour_sump_bg := (.44,.81,.92);%dark blue
>>>
>>> %these colours affect the linework
>>> !color colour_rope;  %! forces interpretation as metapost
>>> colour_rope :=  (0.35,0.75,1.0);%blue
>>> endcode
>>>
>>>
>>>
>>> Gives the following error message:
>>>
>>>
>>>
>>> >> def_transparent_rgb
>>> ! Isolated expression.
>>> 
>>>(
>>> l.6979 def_transparent_rgb (
>>> tr_color_sump_bg, .44, .81, .92)
>>> %transparent ve...
>>> I couldn't find an `=' or `:=' after the
>>> expression that is shown above this error message,
>>> so I guess I'll just ignore it and carry on.
>>>
>>> ! Extra tokens will be flushed.
>>> 
>>>(
>>> l.6979 

Re: [Therion] cannot load thconfig in xtherion

2021-08-23 Thread Bruce Mutton
If there is a vote going on extensions, I'd go for .thc rather than .thconfig, 
but I guess it is not so important.
Bruce

-Original Message-
From: Therion  On Behalf Of Tarquin Wilton-Jones via 
Therion
Sent: Monday, 23 August 2021 20:37
To: therion@speleo.sk
Cc: Tarquin Wilton-Jones 
Subject: Re: [Therion] cannot load thconfig in xtherion

On 23/08/2021 09:29, Martin Sluka via Therion wrote:
> BTW, using for project “foo" name “foo.thconfig" is not a bad idea.

Indeed. It makes your code more portable, since Windows doesn't show a "what do 
you want me to do with this 'thconfig.[nothing]' file that has no mimetype 
data?" dialog. Grr.
___
Therion mailing list
Therion@speleo.sk
https://mailman.speleo.sk/listinfo/therion

___
Therion mailing list
Therion@speleo.sk
https://mailman.speleo.sk/listinfo/therion


Re: [Therion] cannot load thconfig in xtherion

2021-08-23 Thread Tarquin Wilton-Jones via Therion
On 23/08/2021 09:29, Martin Sluka via Therion wrote:
> BTW, using for project “foo" name “foo.thconfig" is not a bad idea.

Indeed. It makes your code more portable, since Windows doesn't show a
"what do you want me to do with this 'thconfig.[nothing]' file that has
no mimetype data?" dialog. Grr.
___
Therion mailing list
Therion@speleo.sk
https://mailman.speleo.sk/listinfo/therion


Re: [Therion] cannot load thconfig in xtherion

2021-08-23 Thread Martin Sluka via Therion
BTW, using for project “foo" name “foo.thconfig" is not a bad idea.

M.

> 22. 8. 2021 v 23:57, Wookey :
> 
> If you run xtherion then try to load a thconfig file you get this error:
> 
> /thconfig.thcfg does not exist
> 
> It works if you run
> 
> xtherion thconfig
> 
> (or otherwise specifying the correct path to the thconfig file)
> 
> So something in the codebase seems to have decided that thconfig files must 
> now be called thconfig.thcfg or thconfig.thconfig. This seems quite broken.
> 
> -- 
> 
> Wookey
> 
> ___
> Therion mailing list
> Therion@speleo.sk
> https://mailman.speleo.sk/listinfo/therion

___
Therion mailing list
Therion@speleo.sk
https://mailman.speleo.sk/listinfo/therion


Re: [Therion] cannot load thconfig in xtherion

2021-08-23 Thread Stacho Mudrak
Hmmm, it seems that's there is a bug in tk_getOpenFile implementation on
unix systems. If it finds some valid "dot" extension in allowed file
extensions, it is used when a file without extension is selected.

I have tried a lot of things, but only a very dirty extension - using "/"
as default file extension - seems to work. Could you please try the latest
commit?

S.


On Mon, 23 Aug 2021 at 09:11, Martin Sluka via Therion 
wrote:

> Years problem on Mac. I have to use foo.thconfig.
>
> Martin
>
> Odesláno z iPhonu
>
> 22. 8. 2021 v 23:57, Wookey :
>
> > If you run xtherion then try to load a thconfig file you get this error:
> >
> > /thconfig.thcfg does not exist
> >
> > It works if you run
> >
> > xtherion thconfig
> >
> > (or otherwise specifying the correct path to the thconfig file)
> >
> > So something in the codebase seems to have decided that thconfig files
> must now be called thconfig.thcfg or thconfig.thconfig. This seems quite
> broken.
> >
> > --
> >
> > Wookey
> >
> > ___
> > Therion mailing list
> > Therion@speleo.sk
> > https://mailman.speleo.sk/listinfo/therion
> ___
> Therion mailing list
> Therion@speleo.sk
> https://mailman.speleo.sk/listinfo/therion
>
___
Therion mailing list
Therion@speleo.sk
https://mailman.speleo.sk/listinfo/therion


Re: [Therion] cannot load thconfig in xtherion

2021-08-23 Thread Martin Sluka via Therion
Years problem on Mac. I have to use foo.thconfig. 

Martin

Odesláno z iPhonu

22. 8. 2021 v 23:57, Wookey :

> If you run xtherion then try to load a thconfig file you get this error:
> 
> /thconfig.thcfg does not exist
> 
> It works if you run
> 
> xtherion thconfig
> 
> (or otherwise specifying the correct path to the thconfig file)
> 
> So something in the codebase seems to have decided that thconfig files must 
> now be called thconfig.thcfg or thconfig.thconfig. This seems quite broken.
> 
> -- 
> 
> Wookey
> 
> ___
> Therion mailing list
> Therion@speleo.sk
> https://mailman.speleo.sk/listinfo/therion
___
Therion mailing list
Therion@speleo.sk
https://mailman.speleo.sk/listinfo/therion