Re: Touch: Non-rectangular Touch areas

2010-02-06 Thread Henry McGilton (Boulevardier)
On Feb 6, 2010, at 6:45 PM, Kyle Sluder wrote: > On Sat, Feb 6, 2010 at 3:45 PM, Development > wrote: >> I really like the sound of this solution. I've never worked with CGPaths, is >> that anything at all like NSBezierPath? >> because it seems like this might be the way to go. Can I use an Im

Re: Touch: Non-rectangular Touch areas

2010-02-06 Thread Henry McGilton (Boulevardier)
aka masks). Memory >>> should not then be an issue. >>> >>> Paul Sanders. >>> >>> - Original Message - >>> From: "Andrew Farmer" >>> To: "Jens Alfke" >>> Cc: >>> Sent: Saturday, February 06, 2010 7:19

Re: Touch: Non-rectangular Touch areas

2010-02-06 Thread Kyle Sluder
On Sat, Feb 6, 2010 at 3:45 PM, Development wrote: > I really like the sound of this solution. I've never worked with CGPaths, is > that anything at all like NSBezierPath? > because it seems like this might be the way to go. Can I use an Image to > create a CGPath? No. This seems to be backward

Re: Touch: Non-rectangular Touch areas

2010-02-06 Thread Development
sage - >> From: "Andrew Farmer" >> To: "Jens Alfke" >> Cc: >> Sent: Saturday, February 06, 2010 7:19 PM >> Subject: Re: Touch: Non-rectangular Touch areas >> >> >> Another simple approach is to use an image to do hit test

Re: Touch: Non-rectangular Touch areas

2010-02-06 Thread Henry McGilton (Boulevardier)
t;Andrew Farmer" > To: "Jens Alfke" > Cc: > Sent: Saturday, February 06, 2010 7:19 PM > Subject: Re: Touch: Non-rectangular Touch areas > > > Another simple approach is to use an image to do hit testing. > You can either create a bitmap image for each

Re: Touch: Non-rectangular Touch areas

2010-02-06 Thread Paul Sanders
7:19 PM Subject: Re: Touch: Non-rectangular Touch areas Another simple approach is to use an image to do hit testing. You can either create a bitmap image for each touchable area, or a single image with a different color for each target, then test the color at the target point to determine

Re: Touch: Non-rectangular Touch areas

2010-02-06 Thread Andrew Farmer
On 6 Feb 2010, at 11:05, Jens Alfke wrote: > The easiest way to do this is to create an NSBezierPath in the shape of the > trapezoid and call -containsPoint: on it; but IIRC, that class doesn't exist > on iPhone. Fortunately the math for hit-testing convex polygons is pretty > easy: check any co

Re: Touch: Non-rectangular Touch areas

2010-02-06 Thread Jens Alfke
On Feb 6, 2010, at 10:54 AM, Development wrote: > I have an app I am working on and several of the touch zones or buttons > occur within a trapezoid. Because these trapezoids touch one another to > complete a picture I need for the zones to be precise. What I'm not sure how > to accompli

Touch: Non-rectangular Touch areas

2010-02-06 Thread Development
I have an app I am working on and several of the touch zones or buttons occur within a trapezoid. Because these trapezoids touch one another to complete a picture I need for the zones to be precise. What I'm not sure how to accomplish is allowing touch within the border of the trapezoid