Keep the properties as a simple list. Only a very limited set is processed here. Has to deal with windows.
Groups do not establish viewports. Each window must be enclosed in a viewport »viewBox«.
Example 4.41. Using Viewport
<svg x="11" y="11" width="2323" height="444" viewBox="0 0 2323 444"> <g id=".x.y.z" style=»winfo class ...« > ... </g> </svg>
Example 4.42. Using Clipping
<g clip-rule="nonzero"> <clipPath id="»window«_clip"> <rect x,y w,h ... /> </clipPath> <g id=$window clip-path="url(#window_clip)" > <rect x y w,h ... /> </g> </g>
...clipping is not sufficient for a window! Every window establishes –by definition– its own viewport.
The scrollregion and other text elements, as in listbox windows. Have to be dealt with here (through the viewBox definition).
Note 10/11/2008 - 18:42 : Walking the window tree must be dumb; every window has to be touched. Invisible windows are left out entirely. Obstructed windows are problematic. They cannot be identified through ismapped or viewable...
Maybe the walk-through should end at a window covering all the space of its parent window, then covered windows are skipped, whenever they happen to be later (lower Z-Order). This makes it possible to skip anything hijacked by gstripes.
Perhaps the entire tree should be cleaned from invisible parent windows, too. Requires to transfer the x,y coordinates down to the child window...
Mostly done within dumper::frame. See also »svgcode.tcl : zordered« for details about obstructed windows.
Total internal properties usage is: 31.
Total client properties usage is: 15.
Example 4.43. ::vgcode::dump-geometry-canvas using properties
... set id \ [$canvas find withtag $target]; set c_name \ [vgcode::baseName $canvas $basename $id_base]; return \ [dumper::canvasNew $c_name window \ [$canvas coords $id] \ [dumper::properties \ [vgcode::clearOptions \ [$canvas itemconfigure $id] $basename]] $target]