diff --git a/docs/functional/FontRendering.md b/docs/functional/FontRendering.md index 3b097bf5..f4b203ab 100644 --- a/docs/functional/FontRendering.md +++ b/docs/functional/FontRendering.md @@ -10,14 +10,14 @@ The feature is supported by a `NodeStorage` object that maps individual nodes to The following class diagram illustrates how the design is realized with the illustration of a `NoteNode` (a node that represents a note on a UML diagram). -![JetUML Class Diagram](FontRendering.class.png) +![JetUML Class Diagram](FontRenderingClass.png) * The (Class)`DiagramRenderer` declares two methods to manage node caching. `activateNodeStorages()` prepares and activates the cache by going through all its viewers and activating _their_ cache. It should be called once before a diagram is drawn. `deactivateAndClearNodeStorages()` clears the cache by going through all the viewers and clearing _their_ cache. It should be called once after a diagram is drawn. * For nodes, method `getBounds(DiagramElement)` of interface `DiagramElementRenderer` is implemented by a final method in `AbstractNodeRenderer` that delegates the call to `getBounds` of class `NodeStorage`. This call takes as second argument a `Function` that is the _bounds calculator_. This function object is use to compute the bounds in case of a cache miss. The design of the bounds calculation mechanism is described below. The following sequence diagram illustrates a scenario where a diagram that contains a single `NoteNode` is drawn. -![JetUML Class Diagram](FontRendering.sequence.png) +![JetUML Class Diagram](FontRenderingSequence.png) 1. The top section shows the activation of the node storages (caches). What's important to note here is that in practice the `DiagramRenderer` aggregates many `NodeVRenderer` objects, so the call to `activateNodeStorage()` will be repeated once for each element renderer managed by the diagram renderer. 2. The middle section shows how the call to `DiagramRenderer#draw` eventually reaches `NoteNodeRenderer#getBounds`, because this information is used to draw the node. This results in a call to `NodeStorage#getBounds` where the second argument (`::internalGetBounds`) is a _reference to a instance method of a particular object_, namely method `internalGetBounds` of the `NoteNodeRenderer` object.