HI, I'm just getting started with some core animation work, and have run into a 
couple of issues pretty much straight away. 

The first is that I am trying to make sure that I will be able to print what I 
have on my view, but this doesn't seem to be working. I tried creating a layer 
backed view, which in its drawRect: method fills the rect with red, and added a 
sub-layer that has an image drawn on it, and an opacity on that layer of 0.5. 
It draws my image over the red background, but when I try to print the view, it 
just prints the drawing that happened in the view itself and not the sub-layer.

I then tried adding a subview with the image on it, and using the layer opacity 
setting for the layer backing of the subview, and it looked OK on screen, but 
printing it showed the image at full opacity. 

Is there some trick I need to know to be able to print exactly what I see on 
the screen?

The second part of this is that I am a little confused by the documentation's 
statements about layer coordinate system. I want to be able to write the 
drawing code once and deploy both on Mac and maybe iOS later. The documentation 
says that UIView uses a flipped coordinate system and that therefore the root 
layer also has a flipped coordinate system. I tried making my view flipped, but 
its layer doesn't appear to be flipped. Does this mean that I have to apply a 
flipping transform to the root layer? 

It also says that layers you instantiate on iOS are flipped and on Mac are not, 
so I presume this means that for every layer I instantiate on MacOS, I have to 
apply a flip transform to get it to the state where I can use the same drawing 
for both platforms, right? (I am so used to drawing in flipped views, that that 
is the way I would want to work anyway).


Thanks

Gideon



_______________________________________________

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

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

Reply via email to