[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
XOR drawing in Cocoa
Looking farther, I found NSFrameRectWithWidthUsingOperation. This sounds
like it should do what I want in one case - which is to draw a selection
rectangle while dragging (although it is Description forthcoming, so who can
say for sure.)
It sounds like XOR drawing must be supported at some level for it to be
available to this function. Unfortunately, it doesn't seem to be exposed
any place except for this function, a couple of FillRect functions and
images.
Unfortunaetly, I don't think that NSFrameRectWithWidthUsingOperation will
work for me because I want to draw over an NSOpenGLView. As far as I can
tell (after trying lots of different things yesterday) you cannot draw over
an NSOpenGLView with non OpenGL functions.
Based on my observations, I am also guesing that - cacheImageInRect: will
not work when you have an NSOpenGLView.
----- Original Message -----
From: "Dan Crevier" <Dan.Crevier@xxxxxxxxx>
To: "Joe Esch" <joe@xxxxxxxxxxxx>; "Mac OS X Dev" <macosx-dev@xxxxxxxxxxxxx>
Sent: Saturday, March 02, 2002 10:47 PM
Subject: Re: XOR drawing in Cocoa
> On 3/2/2002 9:38 AM, "Joe Esch" <joe@xxxxxxxxxxxx> wrote:
>
> > Is there any way to do XOR drawing in Cocoa? I haven't been able to
find
> > anything in NSBezierPath or NSColor. I have seen examples using
NSImage,
> > but I would like to do line drawing.
>
> Quartz doesn't support XOR mode, AFAIK...
>
> Dan
>
> _______________________________________________
> MacOSX-dev mailing list
> MacOSX-dev@xxxxxxxxxxxxx
> http://www.omnigroup.com/mailman/listinfo/macosx-dev
>
>