model/view object graph

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top