• 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: Desktop geometry problem
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Desktop geometry problem


  • Subject: Re: Desktop geometry problem
  • From: Lee Ann Rucker <email@hidden>
  • Date: Fri, 08 Jun 2012 10:51:12 -0700 (PDT)

Searching "bezier path simplify" turned up some interesting results, like this from cocoadev: http://cocoadev.com/wiki/NSBezierPathcombinatorics

Since you have no curves this may be overkill, but I'm sure there's an algorithm out there somewhere for non-intersecting rectangles.

----- Original Message -----
From: "Gregory Weston" <email@hidden>
To: "Kyle Sluder" <email@hidden>
Cc: email@hidden
Sent: Friday, June 8, 2012 4:01:03 AM
Subject: Re: Desktop geometry problem


On Jun 8, 2012, at 02:20, Kyle Sluder wrote:

> On Jun 7, 2012, at 7:30 PM, gweston <email@hidden> wrote:
>
>> On Jun 07, 2012, at 10:22 PM, Graham Cox <email@hidden> wrote:
>>
>>
>> On 07/06/2012, at 9:23 PM, Gregory Weston wrote:
>>
>>> Does anyone know of existing code or a trivial technique to get a CGPath or NSBezierPath that describes the shape of the desktop? I'll write and share it if it's not out there, but I'd rather not reinvent any wheels. My interests are:
>>> 1. It should be the actual perimeter of the desktop, not just the bounding box.
>>> 2. It should be a single polygon, rather than a collection of rectangles.
>>> 3. It should behave properly in the presence of mirrored displays.
>>
>>
>> Just iterate over the list of NSScreens and append each screen rect to a bezier path.
>>
>> First thing I tried. It fails requirement #2.
>
> Is Requirement 2 really a requirement? What are you going to be doing with an NSBezierPath path that is going to be improved by making it a single polygon rather than a union of rectangles?

Strictly what I need is the set of individual line segments that define the perimeter, but I figured that it anyone had a solution to the problem in already it was likely to be giving back a path instead of just a list of points and I could parse the path.
_______________________________________________

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
_______________________________________________

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

References: 
 >Re: Desktop geometry problem (From: Gregory Weston <email@hidden>)

  • Prev by Date: Re: Desktop geometry problem
  • Next by Date: Re: NSSavePanel runModal isn't working in sandbox?
  • Previous by thread: Re: Desktop geometry problem
  • Next by thread: Re: Desktop geometry problem
  • Index(es):
    • Date
    • Thread