Can anyone help me with this? I have an application with foreground BLACK for the text or simple image form. And then I need to use different colors to highlight the interesting parts, sometimes there may be overlapped interesting parts. How can I achive this?
What I did now is to draw the text and image first with black foreground color and then set foreground to the highlight color (red, yellow, etc), and draw the highlight parts. I tried gc funcs GXand and GXorReverse. But I am not sure if this is right solution.
Thanks!
Re: How to draw highlight using truecolor visual
It will depend on what you want to do when there are overlapping regions.
If detail A is red, and detail B is blue, and detail C is yellow, and detail D is green,
what color do you want those regions that are both A and B ? or both A and C?
Or all of A and B and C and D?
--
Fred K
Re: How to draw highlight using truecolor visual
I don't really care about the overlapping as long as the non-overlapping part display correct color and the text/drawing can be seen. I am using double buffer. When I draw the screen, I am not sure which gc function should I use. Before I switch buffer, I set gc func as GXcopy. I need to keep the background as white and (text/drawing) as black. Right now I didn't get correct color displaying.
Thanks for help!
Re: How to draw highlight using truecolor visual
I would think that you should just use GXCopy to draw into the buffer, and the same to copy the buffer to the screen.
--
Fred K