|  |  | 
| Public Member Functions | |
| template<> | |
| void | realignObject (NodeSVG &node, const CoordSpan< AlignBase::Axis::HORZ > &anchorSpan) | 
| template<> | |
| void | realignObject (NodeSVG &node, const CoordSpan< AlignBase::Axis::VERT > &anchorSpan) | 
| template<> | |
| void | realignObject (NodeSVG &node, const CoordSpan< AlignBase::Axis::HORZ > &span) | 
| template<> | |
| void | realignObject (NodeSVG &node, const CoordSpan< AlignBase::Axis::VERT > &span) | 
| Static Public Member Functions | |
| static void | detectBox (TreeSVG &group, bool debug=false) | 
| Compute the bounding box recursively in objects of type IMAGE, RECT, POLYGON and G (group). | |
| static void | getAdjustedBBox (const NodeSVG &node, BBoxSVG &bbox) | 
| template<AlignBase::Axis AX> | |
| static void | adjustLocation (TreeSVG &group, NodeSVG &node, CoordSpan< AX > anchorSpan) | 
| static void | addStackLayout (TreeSVG &object, AlignBase::Axis orientation=AlignBase::Axis::HORZ, LayoutSVG::Direction direction=LayoutSVG::Direction::INCR, unsigned short depth=0) | 
| Set stack layout as a default in a subtree. | |
| static void | setStackLayout (NodeSVG &node, AlignBase::Axis orientation, LayoutSVG::Direction direction) | 
| Sets alignment applying stack layout in a single node. | |
| static void | superAlign (TreeSVG &node) | 
| template<AlignBase::Axis AX> | |
| static void | realignObject (NodeSVG &node, const CoordSpan< AX > &span) | 
| 
 | static | 
Set stack layout as a default in a subtree.
Set instructions, flipping axis in nesting groups of type STACK_LAYOUT.
Stack layout is applied in groups (G) of class STACK_LAYOUT. Stacking means the objects are laid subsequently next to each other, alternating horizontal and vertical orientation in each level of STACK_LAYOUTs.
Currently, the same direction parameter is used for both horizontal and vertical layout. In future, these could be set separately.
To actually align the objects, call also superAlignNew(). *
MOVE
| 
 | static | 
Given a node (requesting Alignment), re-locate it by adjusting transform.x and .y
The anchor always resides in the same group.
| 
 | static | 
Compute the bounding box recursively in objects of type IMAGE, RECT, POLYGON and G (group).
Traverses the structure recursively, updating bounding box at each level.
Future versions may also handle CIRCLE and TEXT (location)
| void realignObject | ( | NodeSVG & | node, | 
| const CoordSpan< AlignBase::Axis::HORZ > & | anchorSpan | ||
| ) | 
Pick dx = bbox.x translate.x = anchor.x -dx
| void realignObject | ( | NodeSVG & | node, | 
| const CoordSpan< AlignBase::Axis::VERT > & | anchorSpan | ||
| ) | 
| anchorSpan | - width or height of the achore rectangle. | 
| 
 | static | 
Sets alignment applying stack layout in a single node.
This function is invoked by TreeUtilsSVG::addStackLayout() .
To finally align (translate) the objects, call also TreeUtilsSVG::superAlignNew(). *
| 
 | static | 
Aligns each object which isAligned()
Ideally, each object (graphic element or compound object) should:
When should an object have both?
mout.accept<LOG_NOTICE>(" adapt1: ", NodePrinter(node).str() );
 1.9.8
 1.9.8