You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jul 24, 2021. It is now read-only.
Reporter: LonelyPixel [Submitted to the original trac issue database at 7.14pm, Friday, 9th January 2009]
If you select an icon to be drawn in a style, you can select some
cryptic name from the internal representation of the more or less
organised embedded icons. The file structure can only be known if you
look hard into the source code. If you want to create or edit your own
style and use more icons, it's very hard to enter these virtual file
names. Supplying your own files is also hard, because you need to enter
absolute pathnames. But how do you know where somebody will copy the
images to your style? (Absolute path names can never be portable.)
Here's the solution: If the icon filename specification does not contain
a backslash or slash (both are required features of an absolute path
specification), the path of the style file is prepended. So you can just
enter the icon's filename without a path, copy it in the same directory
as your style (.mas) file (or in a subdirectory) and you're done.
The current situation is that if you don't enter an absolute path, the
icon is loaded from the current directory - whichever that is. (At least
that's what I suppose after reading the original source code. I haven't
bothered finding out where that path is.)
Also, when you save a style back into a file, all absolute icon
filenames that have the same path as the style file to write, the path
is cut off so that only the filename is written. This keeps filenames
portable when saving the style. But it'll only work if the image files
are in the very same directory as the style file to be written. More
logic could be used here to detect subdirectories. Maybe I'll still do that.
This also has the effect that the style is fully portable and can be
given to and edited by other Merkaartor users, including all icons.
The text was updated successfully, but these errors were encountered:
Reporter: LonelyPixel
[Submitted to the original trac issue database at 7.14pm, Friday, 9th January 2009]
If you select an icon to be drawn in a style, you can select some
cryptic name from the internal representation of the more or less
organised embedded icons. The file structure can only be known if you
look hard into the source code. If you want to create or edit your own
style and use more icons, it's very hard to enter these virtual file
names. Supplying your own files is also hard, because you need to enter
absolute pathnames. But how do you know where somebody will copy the
images to your style? (Absolute path names can never be portable.)
Here's the solution: If the icon filename specification does not contain
a backslash or slash (both are required features of an absolute path
specification), the path of the style file is prepended. So you can just
enter the icon's filename without a path, copy it in the same directory
as your style (.mas) file (or in a subdirectory) and you're done.
The current situation is that if you don't enter an absolute path, the
icon is loaded from the current directory - whichever that is. (At least
that's what I suppose after reading the original source code. I haven't
bothered finding out where that path is.)
Also, when you save a style back into a file, all absolute icon
filenames that have the same path as the style file to write, the path
is cut off so that only the filename is written. This keeps filenames
portable when saving the style. But it'll only work if the image files
are in the very same directory as the style file to be written. More
logic could be used here to detect subdirectories. Maybe I'll still do that.
This also has the effect that the style is fully portable and can be
given to and edited by other Merkaartor users, including all icons.
The text was updated successfully, but these errors were encountered: