V
visionset
I have a graph of node and leaf objects that represent model data.
Now I want to render these in a view.
I'd like to have a Shape object for each leaf which maps the model
data to something renderable.
I don't want any view references in my model. The only way I can think to
do this is have a parallel NodeView/LeafView graph, where a LeafView
object is a composition of Leaf and the Shape.
I'm certain it would be bad for LeafView to subclass Leaf
I could construct the shape objects on the fly, but I'm not sure, with
primitive graphics rendering, aren't they usually cached.
Now I want to render these in a view.
I'd like to have a Shape object for each leaf which maps the model
data to something renderable.
I don't want any view references in my model. The only way I can think to
do this is have a parallel NodeView/LeafView graph, where a LeafView
object is a composition of Leaf and the Shape.
I'm certain it would be bad for LeafView to subclass Leaf
I could construct the shape objects on the fly, but I'm not sure, with
primitive graphics rendering, aren't they usually cached.