[Drawkit] two views, different layers?

James Maxwell jbmaxwell at rubato-music.com
Mon Jul 28 09:01:32 PDT 2008


On 28-Jul-08, at 7:27 AM, Graham Cox wrote:

>
> On 29 Jul 2008, at 12:14 am, James Maxwell wrote:
>
>> hmm... This is all sounding much more complex than just going ahead  
>> with my original idea of two separate drawings. I think I'd better  
>> stick with that, for now, and see what sorts of obstacles I come up  
>> against.
>
>
> Hiding layers is directly supported, so there's nothing wrong with  
> using that to selectively show or hide layers. But your mention of  
> an alpha channel made me wonder if you had some fancy fade effect in  
> mind, which isn't supported.

Oh, no. I was just thinking that, if the layers had to all be in the  
same view, maybe I could "semi-hide" one by making it semi- 
transparent. But that would just be confusing anyway, I think.
>
>
> Going with two drawings - hard to say whether that's a good idea or  
> not for your situation. On the face of it there seems more work to  
> synch up two drawings since they have no properties in common,  
> whereas two layers of the same drawing share many properties in  
> common by design. Synching two otherwise identical data structures  
> is usually a bad idea (data duplication) though sometimes unavoidable.

There will be a certain amount of data duplication in my app anyway -  
it's part of the basic idea - but there shouldn't need to be much.
>
>
> You might also consider using a special view that pulls some tricks  
> like drawing just one specific layer and ignoring the others. There  
> are a variety of ways to solve this problem.

Well, this is what I was wondering about yesterday - the idea of  
having one view draw only layers A, B, C, and another draw only layers  
A, B, D. That would be great. You mentioned the idea of tweaking  
drawRect a little to ask the view which layers to draw. Is that still  
your recommendation?

J.


>
>
> cheers, Graham
>
>
> _______________________________________________
> Drawkit mailing list
> Drawkit at lists.apptree.net
> http://lists.apptree.net/listinfo.cgi/drawkit-apptree.net



More information about the Drawkit mailing list