• 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
CAOpenGLLayer content size
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

CAOpenGLLayer content size


  • Subject: CAOpenGLLayer content size
  • From: Takashi Mochizuki <email@hidden>
  • Date: Sat, 09 Jul 2011 15:33:10 +0900

How can I set static content size to CAOpenGLLayer?

//

Default CAOpenGLLayer keeps initial buffer size when addSubLayer: is called. And it does not update back buffer size even when layer is resized like:

1. addSubLayer to 200x200
2. resize layer to 400x400
3. layer only shows 200x200 area (keep low resolution)

I have found that, to change backing buffer size, send setNeedsDisplay to layer, or set needsDisplayOnBoundsChange property to YES.

This works, but it does also set new content size. It seems like breaking contentsGravity property.

I want to set static content size to my CAOpenGLLayer's subclass.

//

My preferred behavior is similar to QTMovieLayer.

QTMovieLayer runs in static content size(source movie rectangle). And when layer is resized, displayed movie bounds changes preserving contentsGravity settings. (Keep aspect ratio, etc.)


Takashi Mochizuki_______________________________________________

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: CAOpenGLLayer content size
      • From: David Duncan <email@hidden>
  • Prev by Date: Re: Adding Spotlight comment data to folder/file
  • Next by Date: NSTextFieldCell Action Method Not Reaching Delegate?
  • Previous by thread: Re: Adding Spotlight comment data to folder/file
  • Next by thread: Re: CAOpenGLLayer content size
  • Index(es):
    • Date
    • Thread