[futurebasic] Re: [FB] Convert Region to CGPath or just get a points list?

Message: < previous - next > : Reply : Subscribe : Cleanse
Home   : April 2004 : Group Archive : Group : All Groups

From: Robert Covington <artlythere@...>
Date: Fri, 16 Apr 2004 01:11:22 -0400
On Thursday, April 15, 2004, at 04:45  PM, Robert Purves wrote:

>
> Robert Covington wrote:
>
>> Is there any way in this new hades of opaque region handles to 
>> convert a region to a path?
>
>> Can a points/polygon list be extracted these days from the 
>> newfangled, "opaque" region handles?

<snip of RP demo>

Thanks RP, that's interesting. I came across mention of the 
RegionToRects thing and various UPPs during a rampant Apple Dev and 
Googling of Mac dev newsgroups session last night, but didn't know if 
it would aid. They should just make this easy and have 
CGPathFromQDRegion.

Your demo leads (thankfully) to the obvious next problem...how to 
translate such strange "lists" properly into a round-robin path for 
describing same region using  fn CGContextMoveToPoint( ctx,  x, y ) and 
FN CGContextAddLineToPoint( ctx, x, y ) (after CGContextBeginPath) to 
get the same result as a Frame Region once StrokePath is called?

When I store and plot the rect T,L and R,B points just as a test, there 
appear to be a few missing on the right side when simply plotted. Going 
to take some finessing. If using Lineto's then things show up a bit 
better.


  r
c