nanogui: Clearing a certain area of a window


Previous by date: 1 Oct 2005 04:49:08 +0100 Re: Clearing a certain area of a window, Greg Haerr
Next by date: 1 Oct 2005 04:49:08 +0100 Problem with overwriting text., amareesh
Previous in thread: 1 Oct 2005 04:49:08 +0100 Re: Clearing a certain area of a window, Greg Haerr
Next in thread: 1 Oct 2005 04:49:08 +0100 Re: Clearing a certain area of a window, Alex Holden

Subject: Re: [nanogui] Clearing a certain area of a window
From: tj ####@####.####
Date: 1 Oct 2005 04:49:08 +0100
Message-Id: <433E0777.9020901@comcast.net>

Greg Haerr wrote:

>: Is it possible to clear only a certain rectangular area of a window 
>: instead of having to use GrClearWindow()? I have used GrFillRect() when 
>: the background is solid,
>
>GrClearWindow will clear just a portion of a window, and that should
>be the best choice, if the application never drew the window in the
>first place.  If the application used GrFillRect, then that should be
>used to repaint.
>
>  
>
I'm confused, my usual state :-). I thought GrClearWindow() basically 
"wiped the window clean" leaving only the background. Whether it be a 
solid color or a pixmap. How does it clear only a portion of a window 
when it only takes the window id, no bounding coordinates, as an argument?

>:  but what about when the background is a pixmap, 
>: using GrSetBackgroundPixmap()?
>
>GrClearWindow should cause a repaint event such that the
>server executes the same code that drew the background pixmap
>in the first place, tiled, stretched, etc.  
>
>  
>
That is why I want it to do it.

>: 
>: You could GrCopyArea() from the original pixmap to the window, but what 
>: is the background is tiled, stretched, etc?
>
>No sense in duplicating server code, IMO.
>
>
>  
>
Exactly

>: 
>: Be whole lot quicker if it's a small area compared to the entire window. 
>: Especially on a several 100Mhz embedded processor.
>
>Are you saying that GrClearWindow doesn't work, or is just
>slow?  
>
>  
>
No intent to throw anything off on GrClearWindow().
When I started embedded programming more years ago than I care to think 
about a 2 Mhz processor was FAST (Remember 8080s, Z80s, 8048s?), and you 
are always thinking about how to cut instruction cycles. So in my mind, 
if you only need to clear a 200x20 pixel area on a 320x240 window (which 
is 5% of total), that saves a bunch of instruction cycles (not having to 
clear the other 95%) no matter how well the clearing function works or 
how fast it is. Plus, not having to redraw the areas you don't want cleared.

>Regards,
>
>Greg
>
>  
>
tj


Previous by date: 1 Oct 2005 04:49:08 +0100 Re: Clearing a certain area of a window, Greg Haerr
Next by date: 1 Oct 2005 04:49:08 +0100 Problem with overwriting text., amareesh
Previous in thread: 1 Oct 2005 04:49:08 +0100 Re: Clearing a certain area of a window, Greg Haerr
Next in thread: 1 Oct 2005 04:49:08 +0100 Re: Clearing a certain area of a window, Alex Holden


Powered by ezmlm-browse 0.20.