svghmi/geometry.ysl2
branchsvghmi
changeset 3199 1582753e409b
parent 3165 2db69e2c5673
child 3625 bb1eff4091ab
equal deleted inserted replaced
3198:d9c8f8789fc8 3199:1582753e409b
     3 // Geometry (bounding box intersection) definitions
     3 // Geometry (bounding box intersection) definitions
     4 
     4 
     5 // This retrieves geometry obtained through "inkscape -S"
     5 // This retrieves geometry obtained through "inkscape -S"
     6 // already parsed by python and presented as a list of
     6 // already parsed by python and presented as a list of
     7 // <bbox x="0" y="0" w="42" h="42">
     7 // <bbox x="0" y="0" w="42" h="42">
     8 const "geometry", "ns:GetSVGGeometry()";
     8 const "all_geometry", "ns:GetSVGGeometry()";
       
     9 const "defs", "//svg:defs/descendant-or-self::svg:*";
       
    10 const "geometry", "$all_geometry[not(@Id = $defs/@id)]";
     9 
    11 
    10 // Debug data
    12 // Debug data
    11 emit "debug:geometry" {
    13 emit "debug:geometry" {
    12     | ID, x, y, w, h
    14     | ID, x, y, w, h
    13     foreach "$geometry"
    15     foreach "$geometry"