• 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: Draw an NSImage and then erase some parts with NSBezierPath
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Draw an NSImage and then erase some parts with NSBezierPath


  • Subject: Re: Draw an NSImage and then erase some parts with NSBezierPath
  • From: Adam Leonard <email@hidden>
  • Date: Mon, 26 May 2008 15:27:59 -0700

Hi,
Take a look at NSBezierPath's -addClip

http://developer.apple.com/documentation/Cocoa/Conceptual/CocoaDrawingGuide/GraphicsContexts/chapter_3_section_3.html#/ /apple_ref/doc/uid/TP40003290-CH203-BCIIADBC

Adam Leonard


On May 26, 2008, at 2:17 PM, Michaël Villar wrote:

Hi,

What i want is to clear an NSImage (not entirely) with some NSBezierPath.
Here is my actual code :


[_image drawAtPoint:NSMakePoint(0, 0) fromRect:NSZeroRect operation:NSCompositeCopy fraction:1.0];

NSBezierPath * path;
path = [NSBezierPath bezierPath];
[path appendBezierPathWithArcWithCenter:NSMakePoint(0,0) radius:8 startAngle:0 endAngle:360];
[[NSColor clearColor] set];
[path fill];



(If i use NSColor whiteColor, a white circle is drawed ;)) _______________________________________________

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


_______________________________________________

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


References: 
 >Draw an NSImage and then erase some parts with NSBezierPath (From: Michaël Villar <email@hidden>)

  • Prev by Date: Re: NSFileHandle, serial port, Resource temporarily unavailable exception
  • Next by Date: Re: Draw an NSImage and then erase some parts with NSBezierPath
  • Previous by thread: Re: Draw an NSImage and then erase some parts with NSBezierPath
  • Next by thread: NSFileHandle, serial port, Resource temporarily unavailable exception
  • Index(es):
    • Date
    • Thread