nanogui: How to write text through an ico
Subject:
How to write text through an ico
From:
Gil Glass ####@####.####
Date:
18 Oct 2005 20:32:29 +0100
Message-Id: <OF4169C1FE.6D9AFE05-ON8525709E.006A69CD-8525709E.006B4BFE@acterna.com>
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