Read/write SVGs as xmls.
?- svg_size( pack('svg/examples/rea_smp-e10_fclr.svg'), W, H ). W = 497, H = 404.
?- svg_tag_coords( pack('svg/examples/rea_smp-e10_fclr.svg'), text, Coords ), maplist( writeln, Coords ), fail. 197- -302.3 197- -230.3 446- -374.3 ... 344- -14.3 197- -86.3 false. ?- svg_tag_coords( pack('svg/examples/rea_smp-e10_fclr.svg'), text, true, Coords ), maplist( writeln, Coords ), fail. 197-706.3 197-634.3 446-778.3 ... 344-418.3 197-490.3 false. ?- svg_size( pack('svg/examples/rea_smp-e10_fclr.svg'), W, H ). W = 497, H = 404.
If no Files are given, then svgs from current directory are used. If one or more svg files with postfix fclr and a single svg with postfix (os_postfix/2) exist, then those are taken as the inputs, else all svgs are considered.
Opts
adds_lines(Gal=svg_add_lines)
goal that will produce 1. lines to add and the 2. dimensions of legenddebug(Dbg=false)
use true to turn debug messaging oncache(Cache=false)
whether to cache the intermediary (distance) matrices to filesdir(Dir='.')
working directory for when no files are given as inputspostfix(Psfx=leg)
postfix for new svgplacement(Plc=bottom)
legend placement strategy. also implemented:
place_at_x(X)
known to placement: at. mandatory for this placement. pos values work from top, neg from bottomplace_at_y(y)
known to placement: at. mandatory for this placement. pos values work from left, neg from rightplace_with_space(Spc=200)
space parameter for strategies (known to bottom_right) (fixme:)place_with_space_min(SpcMin=100)
mimimum space required (fixme:)has_postfix(Psfx)
postfix that svg files must match to be processed (multiple can be given)?- svg_legend( ['rea_smp-e10_fclr.svg',theme=edges(['E32636'-red_edges,'8DB600'-green_edges]) ] ).
?- svg( pack('svg/examples/rea_smp-e10_fclr.svg'), Svg ). Svg = svg([width='497pt', height='404pt', viewBox='0.00 0.0...]....)
?- svg_version( V, D ). V = 0:1:0, D = date(2021, 2, 19).
The following predicates are exported, but not or incorrectly documented.