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


Mac > Mac Programmer > implement erase...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 1 Topic 964 of 1026
Post > Topic >>

implement eraser for drawing using NSColor and NSBezierPath

by gamiravi.d@[EMAIL PROTECTED] Sep 6, 2007 at 02:38 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?
 




 1 Posts in Topic:
implement eraser for drawing using NSColor and NSBezierPath
gamiravi.d@[EMAIL PROTECT  2007-09-06 02:38:03 

Post A Reply:
  Go here to Signup

AddThis Feed Button


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

Contact
tan12V112 Sun Jul 6 17:59:35 CDT 2008.