• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Rotated and scaled CALayer
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Rotated and scaled CALayer


  • Subject: Rotated and scaled CALayer
  • From: "Rimas M." <email@hidden>
  • Date: Thu, 21 Oct 2010 11:56:43 +0300

Hello list,

I do not have a lot of practice with Core Animation, maybe that is the
reason. I have a real annoying problem.

All I want to do is:
1. Create CALayer
2. Set CGImage for its content
3. Depending on situation rotate and zoom in that layer (or its content)

Looks like everything works, but I am getting "rotated" pixels
(http://dl.dropbox.com/u/2030721/ForAppleList/Rotated Pixels.png).
That is not what I want. I would like to get rotated content of image
with "straight" pixels.

I was trying to play with layer transform property, with layer
delegate "- (void)drawLayer:(CALayer *)layer
inContext:(CGContextRef)ctx" and by using CGContextRotateCTM etc. I
have even tried to use layer and sublayer to split transforms (one
layer scales, and other rotates) but result is always the same.
Is there any way to achieve result I want? Currently the only way I know is:
a) to rotate an image by drawing it to the bitmap context
b) create new rotated CGImage from it
c) and then draw it for scaling.

But this way is quite slow. Is there a better one?

Any help is very appreciate.

Best Regards,

Rimas M.
_______________________________________________

Cocoa-dev mailing list (email@hidden)

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:

This email sent to email@hidden

  • Follow-Ups:
    • Re: Rotated and scaled CALayer
      • From: Andreas Grosam <email@hidden>
  • Prev by Date: ios 4 play video in backgroud?
  • Next by Date: Re: Rotated and scaled CALayer
  • Previous by thread: ios 4 play video in backgroud?
  • Next by thread: Re: Rotated and scaled CALayer
  • Index(es):
    • Date
    • Thread