Lisp HUG Maillist Archive

Operation XOR replacement in quality mode?

If you want to draw something like a selection rectangle which you
want to be able to remove without leaving traces you usually use XOR.
In the olden days, with what is now called "compatible" drawing mode,
you could use :OPERATION BOOLE-XOR to achieve that, but :OPERATION is
not supported with the new "quality" mode.

What is the equivalent technique with quality drawing mode?  I see
that there's something like XOR compositing for newer Cocoa versions,
but I'm on Windows.  Is it either XOR drawing or quality mode but not
both?

Thanks,
Edi.

_______________________________________________
Lisp Hug - the mailing list for LispWorks users
lisp-hug@lispworks.com
http://www.lispworks.com/support/lisp-hug.html


Re: Operation XOR replacement in quality mode?

Unable to parse email body. Email id is 13222

Re: Operation XOR replacement in quality mode?

On Sat, Dec 13, 2014 at 2:21 PM, Nick Levine <nick@nicklevine.org> wrote:
> What I did for Chart (chart.ravenbrook.com) was to perform all the
> graphics on a :quality backing-pixmap. The output-pane on top of the
> pixmap was :compatible and then old-style selection rectangles
> continued to work.

Ah, cool!  It didn't occur to me that you could mix panes with
different drawing modes.  So, when your (compatible) output pane is
drawn by your display callback, you use COPY-PIXELS from a hidden
quality output pane and then draw things like selection rectangles
atop that, right?

FWIW, in my current application CAPI is fast enough so that I can just
invalidate my output pane whenever the mouse moves, so right now I
don't really need XOR techniques.  But I'll try to keep your idea in
mind.

Thanks,
Edi.

_______________________________________________
Lisp Hug - the mailing list for LispWorks users
lisp-hug@lispworks.com
http://www.lispworks.com/support/lisp-hug.html


Re: Operation XOR replacement in quality mode?

Unable to parse email body. Email id is 13224

Updated at: 2020-12-10 08:33 UTC