On Mar 24, 2012, at 06:54 PM, Evadne Wu <e...@monoceroi.com> wrote:

Why not both. Create a common model and use Core Animation to back the 
on-screen view, but when you need to draw, tell the model objects to draw 
themselves using Quartz. -ev
 
I am considering this approach, and also re-looking at all the core animation 
and ns animation options, and have a few follow up questions:

1. One of the problems with using NSViews for an application like mine where I want to display a 
whole lot of sibling subviews that have to be in a particular order, has been that even though you 
can use -addSubview:positioned:relativeTo:, that didn't actually guarantee the order that the views 
were drawn. Now when I am reading through the "Choosing the Animation Technology for Your 
Application" documentation, I see that it says "Both layers and layer-backed views 
support overlapping of layers/views with other layers/views outside of the sublayer/subview". 
Does that mean that when you add subviews when using layer backed views, they are actually 
guaranteed to honor their order (i.e. addSubview will draw the new subview in front of its 
siblings, and addSubview:positioned:relativeTo: will actually always draw in that order, and if you 
ask for subviews of a view, the order of the subviews will be the order in which they are actually 
drawn)?

If so, it appears that I may be able to use layer backed views instead of a 
layer hosting view, which would mean that I wouldn't have to use a separate 
overlay window for editing text etc, which would solve a lot of problems. I 
might need to do some testing with layer backed views...

2. If I use layer backed views instead of a single layer hosting view, will 
that mean that I will be able to print properly (e.g shadows on the views print 
properly)?

3. I have played around with layer hosting before, but very little with layer 
backed views. Using layer hosting, I would have tried to use CAShapeLayer for 
my connector curves (though I have had trouble with these drawing strange 
things in the past), but if I am using layer backed views, I would need to be 
able to redraw the view during the animation. How would I do this? Is there 
some way to tell core animation that this view needs to redraw itself during 
the animation? I don't see anything that calls back to the layer saying that it 
is at a certain animation proportion. I see there is a 
needsDisplayOnBoundsChange property, but in some cases the bounds don't change. 
Could I just add an animatable property to the view which goes from 0.0 to 1.0, 
and then query that to find out how far through the animation it is, and force 
the view to display? 

Are there any other gotcha's with layer backed views to achieve the things I 
need?

Thanks

Ken.



On Mar 24, 2012, at 3:02 PM, Kenneth Baxter <k.b.bax...@mac.com> wrote:

Hi, I am developing an application where I need to be able to handle the 
following requirements:

- Deployment: MacOS X 10.6 and later. May want to develop an iPad version later.
- Type of application: Display and manipulation of graphical objects on a 
canvas.
- Number of graphical objects: up to about 2,000
- Canvas needs to display solid color, gradient, or tiled image
- The entire canvas with all the graphical objects on it need to be able to 
smoothly zoom and pan
- Many of the graphical objects need to display text on them this must be high 
resolution rendering to look good
- The text on graphical objects needs to be editable (I'm ok with putting a 
view overlay over it in order to accomplish this if necessary)
- The graphical objects need to be able to be displayed with shadows and 
reflections.
- The entire canvas and all the displayed objects must be printable at high 
resolution (i.e. PDF).
- We need to animate movement of quite a number of the objects at once.
- The objects that are moving have curved connection lines drawn to other 
objects that stay stationary, and those curves need to animate as the connected 
objects move.

I am looking for recommendations on the best technology to use for this.

...
_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to