• 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: Clearing an NSView
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Clearing an NSView


  • Subject: Re: Clearing an NSView
  • From: "Erik M. Buck" <email@hidden>
  • Date: Tue, 24 Jul 2001 16:30:18 -0500

Try

NSRectFillUsingOperation
Fills a rectangle using an NSCompositingOperation.
void NSRectFillUsingOperation(NSRect aRect, NSCompositingOperation op)

http://gemma.apple.com/techpubs/macosx/Cocoa/Reference/ApplicationKit/ObjC_c
lassic/Functions/AppKitFunctions.html

use NSCompositeCopy with a transparent color or NSCompositeClear

NSCompositingOperation
Moved from dpsOpenStep.h.
typedef enum _NSCompositingOperation {
NSCompositeClear,
NSCompositeCopy,
NSCompositeSourceOver,
NSCompositeSourceIn,
NSCompositeSourceOut,
NSCompositeSourceAtop,
NSCompositeDestinationOver,
NSCompositeDestinationIn,
NSCompositeDestinationOut,
NSCompositeDestinationAtop,
NSCompositeXOR,
NSCompositePlusDarker,
NSCompositeHighlight,
NSCompositePlusLighter
} NSCompositingOperation;

http://gemma.apple.com/techpubs/macosx/Cocoa/Reference/ApplicationKit/ObjC_c
lassic/TypesAndConstants/AppKitTypes.html

A better aproach for transparent overlays is to simply not draw areas that
you want to see through. Use clipping and simple selective drawing.


References: 
 >Clearing an NSView (From: "Phil Barrett" <email@hidden>)

  • Prev by Date: Re: NSQuickDrawView
  • Next by Date: size of enum when used with NSCoder decodeValueOfObjCType: ??? int?
  • Previous by thread: RE: Clearing an NSView
  • Next by thread: open with url
  • Index(es):
    • Date
    • Thread