• 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: See-through custom NSView
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: See-through custom NSView


  • Subject: Re: See-through custom NSView
  • From: Andreas Mayer <email@hidden>
  • Date: Thu, 20 Jul 2006 00:22:34 +0200


Am 19.07.2006 um 16:40 Uhr schrieb Andreas Mayer:

- (void)drawRect:(NSRect)rect {
[[NSColor colorWithCalibratedRed:0.f green:0.5f blue:0.f alpha: 0.5f] set];
NSRectFill(rect);
}

In case someone got the impression it was somehow necessary to fall back to NSRectFill - here is how to do the same using NSBezierPath:


- (void)drawRect:(NSRect)rect {
[[NSColor colorWithCalibratedRed:0.f green:0.5f blue:0.f alpha:0.5f] set];
[[NSGraphicsContext currentContext] setCompositingOperation:NSCompositeCopy];
[[NSBezierPath bezierPathWithRect:rect] fill];
}


I just thought NSRectFill was the simpler solution in this case. :)


Andreas _______________________________________________ Do not post admin requests to the list. They will be ignored. Cocoa-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
References: 
 >Re: See-through custom NSView (From: Michael Lutz <email@hidden>)
 >Re: See-through custom NSView (From: Andreas Mayer <email@hidden>)

  • Prev by Date: Creating Custom Bundle File Format
  • Next by Date: Re: Visual compiling, nodes programming ?
  • Previous by thread: Re: See-through custom NSView
  • Next by thread: possible to pass direct object param from cocoa to applescript?
  • Index(es):
    • Date
    • Thread