• 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
drawing something across multiple NSWindow instances.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

drawing something across multiple NSWindow instances.


  • Subject: drawing something across multiple NSWindow instances.
  • From: John Clayton <email@hidden>
  • Date: Wed, 23 Jan 2008 13:44:41 +0100

Hi All,

I need to draw via CALayer into a space that is greater than 2048x2048. Of course, CALayer's can't be instantiated properly when the total size of the layer exceeds the size limit of a single texture on the graphics hardware (see elsewhere on this list). Here's the background - bear with me while I draw a picture/context for the question...

My program draws a simple rectangle via layers onto a transparent window - the rectangle defines the 'capture area'. (program is called Chatter). I have a class called OverlayWindow and it's sole tasks / responsibilities are to:

- be transparent
- contain a single NSView that has a single CALayer
- provide a rendering context for the CALayer instance

My first solution to this problem is simply to define multiple instances of my OverlayWindow - one per screen. Each OverlayWindow has a single CALayer that is responsible for drawing this 'capture rectangle'. Works like a charm.

For testing purposes I decided to put 4 OverlayWindow instances on each screen (just to make sure that my handling of different co- ordinate offsets was working ok).

The problem is that I get 'shearing' across the window boundaries when the layer content is moving across these boundaries, and my question is this:

My Question
Given 4 standard NSWindow instances [that are transparent and juxtaposed], is there a way to enforce synchronized display on these instances? Keeping in mind that I am putting content on the windows via CALayers. Also; when I change the frame of the CALayer, I am doing so within a CATransaction in an attempt to force the updates to occur all at once.


Thanks,

PS: if you want to see where the shearing is taking place, I have a photo gallery with two pictures showing 'good' and 'bad' examples:
http://gallery.mac.com/john_clayton#100093&bgcolor=black&view=grid




Thanks
--
John Clayton




_______________________________________________

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: App-specific URLs and the pasteboard. Need help.
  • Next by Date: Re: NSRuleEditor
  • Previous by thread: Re: NSOutlineView problem
  • Next by thread: Get font name and size chosen
  • Index(es):
    • Date
    • Thread