Path: utzoo!attcan!uunet!lll-winken!lll-ncis!helios.ee.lbl.gov!pasteur!ames!husc6!bloom-beacon!primerd!zaphod!doug From: doug@zaphod.prime.com Newsgroups: comp.windows.x Subject: CLX and inverting pixels Message-ID: <34700004@zaphod> Date: 5 Jan 89 16:26:00 GMT Lines: 25 Nf-ID: #N:zaphod:34700004:000:1060 Nf-From: zaphod.prime.com!doug Jan 5 11:26:00 1989 This is really a question about CLX and not Xlib. In CLX I cannot find a way to operate on a section of pixmap without uploading the bits, operating on them and then downloading the bits: (defmethod invert-area ((self drawable) x y width height &aux image-bits image) (setq image (get-image self :x x :y y :height height :width width)) (setq image-bits (xlib::image-x-data image)) (dotimes (i (length image-bits)) (setf (svref image-bits i) (logxor #xFF (svref image-bits i)))) (put-image self *gc* image :x x :y y)) Now this is clearly a braindamaged way to do this kind of thing which is pervasively needed to implement popup-menus, buttons, highlighting text, etc. Is there a better way? Does CLX provide it? Can an extension to CLX be easily done which handles this? Douglas Rand Internet: doug@zaphod.prime.com Usenet: primerd!zaphod!doug Phone: (508) - 879 - 2960 Mail: Prime Computer, 500 Old Conn Path, MS10C-17, Framingham, Ma 01701 -> The above opinions are mine alone. (well maybe *someone* agrees)