• 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: Erasing drawn content
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Erasing drawn content


  • Subject: Re: Erasing drawn content
  • From: Alastair Houghton <email@hidden>
  • Date: Wed, 9 Jun 2010 20:06:05 +0100

On 9 Jun 2010, at 19:06, Matej Bukovinski wrote:

> The layer approach din't work out as well. I get the same black color problem as with the view.
>
> Overriding drawRect: is problematic for WebViews, as Jens pointed out WebViews do all sorts of drawing voodoo. Believe me, I've tried.
>
> It seems that the only option left manually doing difference operations (or doing an overlay window) on the rectangles and drawing only the uncovered portions. Set operations on NSBezierPath would definitely help.

If it were *my* program, I think I'd just use an overlay window; that way you can draw what you please and you don't have to worry about what WebKit (or some plug-in) may or may not be doing.

FWIW, rectangle intersections are pretty easy (just draw the cases on a piece of paper and you'll see what I mean).  General Boolean ops are a *much* harder problem, but you *really* don't need that for what you're doing.

Kind regards,

Alastair.

--
http://alastairs-place.net



_______________________________________________

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: Erasing drawn content
      • From: Paul Kim <email@hidden>
References: 
 >Re: Erasing drawn content (From: "Paul Sanders" <email@hidden>)
 >Re: Erasing drawn content (From: Matej Bukovinski <email@hidden>)

  • Prev by Date: Re: Erasing drawn content
  • Next by Date: Re: Erasing drawn content
  • Previous by thread: Re: Erasing drawn content
  • Next by thread: Re: Erasing drawn content
  • Index(es):
    • Date
    • Thread