• 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
Re: CALayer contents and image aspect ratio
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: CALayer contents and image aspect ratio


  • Subject: Re: CALayer contents and image aspect ratio
  • From: Shripada Hebbar <email@hidden>
  • Date: Wed, 2 Jul 2008 14:41:15 +0530

You can set the value of the property 'contentsGravity' to kCAGravityResizeAspect.

Read about 'Positioning contents within a layer' at:

http://developer.apple.com/documentation/Cocoa/Conceptual/CoreAnimation_guide/Articles/ProvidingCALayerContent.html

-Shripada

On 02-Jul-08, at 1:03 PM, email@hidden wrote:

Message: 3
Date: Tue, 1 Jul 2008 20:39:51 -0700
From: "Wayne Shao" <email@hidden>
Subject: CALayer contents and image aspect ratio
To: Cocoa <email@hidden>
Message-ID:
	<email@hidden>
Content-Type: text/plain; charset=ISO-8859-1

Hi,

I provide a CGImageRef as the layer content. When the bounds of layer
is changed, the image seems to be scaled to fit the bounds.
Is there an option to keep the image aspect ratio?  what possible
key-value can I set for the layer's style property?


Thanks, -- Wayne Shao



----------------------------------------------- Robosoft Technologies - Come home to Technology

Disclaimer: This email may contain confidential material. If you were not an intended recipient, please notify the sender and delete all copies. Emails to and from our network may be logged and monitored. This email and its attachments are scanned for virus by our scanners and are believed to be safe. However, no warranty is given that this email is free of malicious content or virus.
_______________________________________________

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


  • Prev by Date: Re: Process app.
  • Next by Date: Re: Why aren't my bindings firing?
  • Previous by thread: CALayer contents and image aspect ratio
  • Next by thread: setFirstResponder to NSTextField fails 1st time, works next
  • Index(es):
    • Date
    • Thread