nanogui: Problem with overwriting text.


Previous by date: 6 Oct 2005 15:03:11 +0100 linking application to server, praveen gr
Next by date: 6 Oct 2005 15:03:11 +0100 Re: linking application to server, Greg Haerr
Previous in thread: 6 Oct 2005 15:03:11 +0100 Re: Problem with overwriting text., Aaron J. Grier
Next in thread:

Subject: Re: [nanogui] Problem with overwriting text.
From: Gil Glass ####@####.####
Date: 6 Oct 2005 15:03:11 +0100
Message-Id: <OF2497D3E9.3B092102-ON85257092.004CB121-85257092.004D265B@acterna.com>

:: I followed instructions from u, still it dosent help until I write a
:: sufficiently long empty string with GrSetGCUseBackground(gc, TRUE)
:: before the actual text(to have a cleaning effect.)
:: This workaround is an overhead.

:Well, there's no workaround to having to draw background
:pixels to erase text you want erased.  If you don't want to
:use the GrSetGCUseBackground method, then you'll have
:to use GrFillRect to clear the area before drawing text, and
:then drawing text without the background.

I found the same thing and Greg's solution, above, is exactly what I 
decided to do.  I've been working on my own text edit widget and to get 
around the problem of, e.g. a '1' not fully overwriting an 'M', I do a 
GrFillRect() to clear the area under the block cursor before placing the 
text.  The overhead is not significant for me because this is a user input 
widget and so taking a few extra microseconds to draw text is no big deal. 
 Your mileage may vary depending on your application.

Gil Glass
Telecom Field Services
JDSU
Germantown, MD, USA
+1-240-404-2551

Previous by date: 6 Oct 2005 15:03:11 +0100 linking application to server, praveen gr
Next by date: 6 Oct 2005 15:03:11 +0100 Re: linking application to server, Greg Haerr
Previous in thread: 6 Oct 2005 15:03:11 +0100 Re: Problem with overwriting text., Aaron J. Grier
Next in thread:


Powered by ezmlm-browse 0.20.