On Wed, 29 Mar 2000, [EMAIL PROTECTED] wrote:

> On 29 Mar 2000, Lars Clausen wrote:
> 
>> On Wed, 29 Mar 2000, [EMAIL PROTECTED] wrote:
>> 
>> > On Wed, 29 Mar 2000, Alexander Larsson wrote:
>> > 
>> >> Also, I'm not sure if this is the right way to do this. I think it
>> >> would be better if the object itself could somehow see it it was
>> >> selected. Then all the drawing logic goes into the object, and no
>> >> modifications to the renderer is needed.
>> > 
>> > Actually, i think we should modify the draw method of Object to pass a
>> > boolean "selected". Then you can check that, and
>> > renderer->is_interactive to see if guides should be drawn.
>> 
>> No, I'd rather have it on the object, then, in case other functions
>> might want it.
>
>  Well, it will be hell to keep the state up to date.

If anybody does select/unselect except through data_select(),
data_unselect() and data_remove_all_selected(), they should be fixed,
right?  I was worried about the same, but I think it's well enough
encapsulated that it's not going to be a problem.  Passing selectedness to
draw strikes me as rather kludgy.

>> But overall I'd like the object to not have to know so much about
>> the renderer.
> 
> Well, they don't. They know if they (the objects) are selected. I don't
> know what it has to do with the renderer at all.

They will have to know that only interactive renderers would want to
display guidelines, and only if the object is selected.  That's information
about how the renderer wants to render things.

-Lars

-- 
Lars Clausen (http://shasta.cs.uiuc.edu/~lrclause) | H�rdgrim of Numenor
"I do not agree with a word that you say, but I    | Retainer of Sir Kegg
will defend to the death your right to say it."    |   of Westfield
    --Evelyn Beatrice Hall paraphrasing Voltaire   | Chaos Berserker of Khorne

Reply via email to