nanogui: How to write text through an ico
Subject:
Re: [nanogui] How to write text through an ico
From:
tj ####@####.####
Date:
19 Oct 2005 04:28:01 +0100
Message-Id: <4355BD86.9020604@comcast.net>
Exactly the same thing here. What I wanted to do acted right when the
backbround was white. The prblem is it xors whith a non white
background. Then it xor's the black text with a colored background and
the text, or icon, was some shade of grey instead of black.
Gil Glass wrote:
>TJ,
>
>I'm not sure whether this will help you but I found something odd when
>using XOR mode.
>
>I wrote my own text entry and list menu widgets using Nano-X and I found
>that in order to, for example, draw a black cursor over black text on a
>white background, I had to set the foreground color to WHITE and then
>GrFillRect() using XOR mode. That is:
>
> GrSetGCForeground(m_gcId, GR_COLOR_WHITE); // Huh?
> GrSetGCMode(m_gcId, GR_MODE_XOR);
> GrFillRect(m_windowId, m_gcId, x, y, width, height);
>
>This seems strange to me but it works.
>
>Again, I have a white background and black text. It seems to me that I
>would want to XOR that area with BLACK, i.e. BLACK rectangle ^ WHITE
>background = BLACK rectangle and BLACK rectangle ^ BLACK text = WHITE text
>(on black rectangle). Did you follow that? ;-)
>
>Gil Glass
>Telecom Field Services
>JDSU
>Germantown, MD, USA
>+1-240-404-2551
>
>
>