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

implement eraser for drawing using NSColor and NSBezierPath

 
   Macintosh computer (Home) -> General Discussion RSS
Related Topics:
Implement BlueBeam Appearance With HIView - I Want implement a bluebeam use will draw a push button but not an you give me some advice?

Drawing an image in carbon - I am new to Carbon and i need help in a RAW 32-bit image in screen. I need an API to in Turbo C++. Also i need an API that allows me to store the Raw image as TIFF or JPEG. Thanx

drawing NSImage in a NSCustomView - Im a newb with ObjC and Cocoa. I have been able to load an jpg from a resource bundle and setImage: in a That works Now I know that I can load the image I am trying to draw the nsimage onto a NSView. I..

Drawing Ellipse with Quartz 2D - I want to emulate the behavior of FrameArc with Quartz in the Carbon API. (FrameArc takes a rectangle and two angles. The total ellipse would exactly fill the rectangle and we only draw the part of the ellipse specified by the angles. If the..

XCode move lost my drawing - Hi, I have a basic program for where I use to get me a blank screen and then do the following simple sequence. Draw wait until GetKeys returns write time to file, Draw Anyway, in..
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:38 am
Post subject: implement eraser for drawing using NSColor and NSBezierPath
Archived from groups: comp>sys>mac>programmer>misc (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) -> General Discussion 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 ]