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

Strange color behavior



I run the following code...

(require 'quickdraw)

(setf xxx (make-instance 'window :color-p T))

(with-focused-view xxx
  (with-fore-color (make-color 0 40000 40000)
    (pen-normal xxx)
    (let ((old-pat (pen-pattern xxx)))
      (set-pen-pattern xxx *gray-pattern*)
      (set-pen-size  xxx (make-point 5 5))
      (move-to xxx 0 30)
      (line-to xxx 200 30)
      (set-pen-pattern xxx old-pat)
      (move-to xxx 0 50)
      (line-to xxx 200 50)
      (dispose-record old-pat))))

And instead of a grey-patterned blue line followed by a black-patterned
(i.e. solid) blue line, I get a grey-pattern blue line followed by a
strange pattern blue line. (The pen-normal call should be redundant since a
window is supposed to default to black-pattern, but I was trying to make
sure that something was wrong.)

The strange thing, is that if I _remove_ the :color-p T initarg and let
make-instance default to a non-color window, the color works just as I
would expect...

Any explanations?

Thanks.