check to make sure that color is available for graying out parens
. original commit: 03a2ad724deaa66476e550075abf61f633cb6c16
This commit is contained in:
parent
50c2d7869d
commit
de7a4bd743
|
@ -459,7 +459,16 @@
|
|||
[old-brush (send dc get-brush)]
|
||||
[old-logical-function (send dc get-logical-function)]
|
||||
[b/w-bitmap (rectangle-b/w-bitmap rectangle)]
|
||||
[color (rectangle-color rectangle)]
|
||||
[color (let* ([rc (rectangle-color rectangle)]
|
||||
[tmpc (make-object wx:colour% 0 0 0)])
|
||||
(if rc
|
||||
(begin (send dc try-colour rc tmpc)
|
||||
(and (<= (max (abs (- (send rc red) (send tmpc red)))
|
||||
(abs (- (send rc blue) (send tmpc blue)))
|
||||
(abs (- (send rc green) (send tmpc green))))
|
||||
15)
|
||||
rc))
|
||||
rc))]
|
||||
[left (rectangle-left rectangle)]
|
||||
[top (rectangle-top rectangle)]
|
||||
[width (rectangle-width rectangle)]
|
||||
|
|
Loading…
Reference in New Issue
Block a user