Welcome to MacForumz.com!
FAQFAQ      ProfileProfile    Private MessagesPrivate Messages   Log inLog in

implement eraser for drawing using NSColor and NSBezierPath

 
   Macintosh computer (Home) -> Programmer Help RSS
Next:  implement eraser for drawing using NSColor and NS..  
Author Message
gamiravi.d

External


Since: Jun 16, 2007
Posts: 13



(Msg. 1) Posted: Thu Sep 06, 2007 2:41 am
Post subject: implement eraser for drawing using NSColor and NSBezierPath
Archived from groups: comp>sys>mac>programmer>help (more info?)

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 port
[path stroke]; //path is object of NSBezierPath



can anyone help me what is the reason for this?

 >> Stay informed about: implement eraser for drawing using NSColor and NSBezierPath 
Back to top
Login to vote
Display posts from previous:   
   Macintosh computer (Home) -> Programmer Help All times are: Pacific Time (US & Canada) (change)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You can edit your posts in this forum
You can delete your posts in this forum
You can vote in polls in this forum



[ Contact us | Terms of Service/Privacy Policy ]