bug-ncurses
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: increase the maximum number of color pair


From: hingwah
Subject: Re: increase the maximum number of color pair
Date: Fri, 10 May 2002 04:06:36 +0800
User-agent: Mutt/1.3.28i

On Thu, May 09, 2002 at 03:34:43PM -0400, Thomas Dickey wrote:
> On Thu, May 09, 2002 at 11:15:39PM +0800, address@hidden wrote:
> > 
> > Hello,
> > 
> >     Is there anyway to increase the maximum number of color pairs
> >     apart from modify the terminfo "pair#64" to larger value?
> 
> no.
> 
> >     otherwise,we can't use all the color available at the same times
> >     (pair 0 can't be changed ,so we need 8*8+1 = 65 pair,moreover,
> >     including the default color (-1), we need 9*9+1=82 pair for
> >     that..
> 
> "default" is built-in and doesn't count toward color-pairs.
but if we use default color by calling use_default_color, 
we will have an addition color number -1 for foreground and background
and this can have a combination  of init_pair(-1,0); to init_pair(-1,7);
and init_pair(0,-1) to init_pair(7,-1); which result in additional 16
pair which can be fully represented by the current max number of color
pair if we try to initialize all the available pair..i.e 8*8+16 = 80..

> 
> -- 
> Thomas E. Dickey <address@hidden>
> http://invisible-island.net
> ftp://invisible-island.net
> 
> _______________________________________________
> Bug-ncurses mailing list
> address@hidden
> http://mail.gnu.org/mailman/listinfo/bug-ncurses



reply via email to

[Prev in Thread] Current Thread [Next in Thread]