Graph Layout > Using Advanced Features > Laying Out Graphs with Nonzoomable Graphic Objects > How a Reference Transformer is Used
 
How a Reference Transformer is Used
For a simple example of how a reference transformer is used, consider the boundingBox(IlAny nodeOrLink) method. This abstract method of the IlvGraphModel class is implemented in the IlvGrapherAdapter. To compute the bounding box, it calls the IlvGraphic::boundingBox(IlvTransformer t) method of the graphic object that it receives as an argument. However, it does not handle zoomable objects and nonzoomable objects in the same way.
If the graphic object is zoomable, the IlvGrapherAdapter::boundingBox(IlAny nodeOrLink) method of the IlvGrapherAdapter returns the bounding box in manager coordinates by calling IlvGraphic::boundingBox(null).
If the graphic object is nonzoomable, the IlvGrapherAdapter::boundingBox(IlAny nodeOrLink)method computes the bounding box according to the reference transformer and returns a rectangle obtained by applying the inverse transformation to this rectangle. (See the IlvTransformer::inverse(IlvRect rect) method.)
The geometry of the IlvGrapher is computed in such a manner that the resulting drawing inside an IlvMgrView using the reference transformer will look fine.

Version 6.1
Copyright © 2016, Rogue Wave Software, Inc. All Rights Reserved.