Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Objective-c > implement erase...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 2 Topic 900 of 1009
Post > Topic >>

implement eraser on window using cocoa

by gamiravi.d@[EMAIL PROTECTED] Sep 6, 2007 at 02:35 AM

Hello,
        I had an image on cocoa window. i can perform operations like
drawing with green pen ,red pen etc using NSBezierPath. now i want to
create something like eraser for erasing on window. For that i created
color from NSImage using API "colorWithPatternImage:NSImage" that
returns NSColor then later i called "set" method on that NSColor
object. but still i am not getting the exact pattern color as
background image . some newer color is getting created.


NSColor *color1 = [[NSColor colorWithPatternImage:image] retain];
[color1 set];      //set the pattern color on current graphics ****t
[path stroke];    //path is object of NSBezierPath



can anyone help me what is the reason for this?
 




 2 Posts in Topic:
implement eraser on window using cocoa
gamiravi.d@[EMAIL PROTECT  2007-09-06 02:35:06 
Re: implement eraser on window using cocoa
Gregory Weston <uce@[E  2007-09-06 09:22:41 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Sat Jul 26 5:41:53 CDT 2008.