Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uunet!mcsun!ukc!icdoc!sot-ecs!M.R.Dobie From: M.R.Dobie@ecs.soton.ac.uk Newsgroups: comp.windows.open-look Subject: Xview icon question (how to invert one) Message-ID: <8356.9012111640@hilliard.ecs.soton.ac.uk> Date: 11 Dec 90 16:40:29 GMT Sender: mrd@ecs.soton.ac.uk Lines: 37 X-Mailer: ELM [version 2.3 PL6] I am new to Xview, so if I have missed anything obvious, flame away :-) OK, here's the problem. I have an icon which I want to load in from an icon file at run time, so I use the icon_load function (which is in the SunView manual but also in the xview include files so I thought it would be OK). Anyway, it all works fine. Then I want to invert the icon (black to white, not upside down :-|) Somewhere in O'Reilly volume 7 I read that I should use all the X graphics calls, so I read about Pixmaps and graphics contexts and XCopyArea to do the inversion. To get a Pixmap I got the ICON_IMAGE from the icon to give me a Server_image. Then I tried to get the SERVER_IMAGE_PIXMAP from the Server_image to give me a Pixmap to invert. This is where it goes wrong. Whenever I try to get some attribute of the Server_image I get an error, XView warning: Object 0xdc40, invalid object (embedding seal incorrect), xv_get Several thoughts occured to me. Can you only get a Server_image from an icon if it was created with a Server_image? Is icon_load the wrong thing to use? I tried my code in different parts of the program (before xv_main_loop and in an event procedure). Does anyone know what the matter is? -- Mark