SVG Library compiler allows creating user-defined SVG symbols library.
Most of the SVG symbols are accepted. However, some complicated one, with gradient files, for example, can be rendered incompletely. Generally, please follow SVG Tiny specification for best results.
Create an empty folder and copy your *.svg symbols there. You can place your symbols in subfolders, the compiler will read all of them, but folder organization will be ignored. Only the SVG files are supported - SVGZ symbols should be extracted first.
A folder must contain file copyright.txt which briefly (like in 250 characters, but it is not a hard limit) describes your library.
All full black colors (
“#00000) within SVG symbols will react to to DK Symbol.Color. By specyfying colors as
#000002 you can enforce colors to be interpreted as Symbol.Color and Symbol.OutlineColor.
Each SVG file like myfile.svg must have a corresponding description file name myfile.svg.inf.
[INFO] CATEGORY= CAPTION=
Non-ASCII characters should be encoded as UTF8 and a file should have a proper UTF BOM header.
Example file in our library Cirel01.svg.inf is:
[INFO] CATEGORY=Locators;Circles CAPTION=Circle 1
ttkSymLibCompiler.exe name source output
LIBSVG:std:Cirel01(name are not case sensitive!); use a unique name preferably using your product or company name; TatukGIS already uses
ttkSymLibCompiler.exe std c:\project\symbollibrary\std c:\libaryoutput
The library will be automatically registered if placed together with an executable file of your application.
Libary name is not significant as long as files extension is '.ttklibsvg'. Symbol prefixes, which are the same as original library name, are embedded upon compilation into the library file.
You can also use TGIS_SymbolLibrarySVG.RegisterFileLibrary method or TGIS_SymbolLibrarySVG.RegisterResourceLibrary method to register your library upon startup.