CLIM mail archive

[Prev][Next][Index][Thread]

Semantics of flipping inks



   From: Lawrence.G.Mayka@att.com
   Date: Sat, 23 Apr 94 15:13:56 CDT
   Original-From: lgm@ieain.ih.att.com

   CLIM 2.0 on Allegro CL 4.2
   CLIM 2.0-beta on LispWorks 3.2

   I'm having some difficulty with the semantics of flipping inks.  The
   documentation is clear, for example, as to what CLIM:+FLIPPING-INK+
   does to output whose color happens to exactly match either
   CLIM:+FOREGROUND-INK+ or CLIM:+BACKGROUND-INK+.  But what does it do
   to any other color?  Are the consequences entirely unspecified?  I

Yes, the consequences of drawing with a flipping ink when the drawn-on
part of the medium do not match one of the two colors in the flipping
ink are entirely unspecified.  In fact, the results you see below may
very well change from one session to another, depending on what
happens to be in the color map at the time you try the experiment.

BTW, right now I believe that only Allegro CLIM properly supports
color flipping inks.  We plan to fix this in Harlqn CLIM.

   tried repeated evaluations of the following expression in a CLIM
   Listener, on two different CLIM 2.0 implementations:

   (clim:with-room-for-graphics ()
     (clim:draw-circle* *standard-output* 100 100 100 :ink <color>)
     (clim:draw-rectangle* *standard-output* 50 50 150 150 :ink clim:+flipping-ink+))

   For <color> I used, in turn, CLIM:+RED+, CLIM:+GREEN+, CLIM:+BLUE+,
   CLIM:+YELLOW+, CLIM:+MAGENTA+, and CLIM:+CYAN+.  The resulting
   rectangles were of the following colors:

   Circle          Rectangle
   ------           ---------
   red             gray
   green           black
   blue            black
   yellow          gray
   magenta         red
   cyan            light green

   Is there any simple mental model I can use to predict the behavior of
   flipping inks?

The simplest model, which also has the benefit of being accurate, is
that drawing the same figure at the same place with the same flipping
ink twice is a no-op.  In fact, the only reason flipping inks are in
CLIM at all is because that operation is so darned useful.

References:

Main Index | Thread Index