[<<] [<] Page 1 of 1 [>] [>>] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Subject:
Problem with GC_MODE
From: Carlo Zinato ####@####.#### Date: 26 Sep 2007 15:38:23 +0100 Message-Id: <46FA6ED8.6060609@viscount.it> Hi all, I'm using a truecolor 565 color framebuffer drawing graphics exclusively in black and white, i.e. with GrSetGCBackground(gc, WHITE) and GrSetGCForeground(gc, BLACK). Everything works fine in GR_MODE_COPY and GR_MODE_COPYINVERTED (involving only src graphic), but when I use any other mode which combines src and dst nothing is drawn. For example if I draw in GR_MODE_XOR mode a black box somewhere over a bigger black box nothing happens. Am I missing something? Thanks in advande, Carlo | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Subject:
Re: [nanogui] Problem with GC_MODE
From: Carlo Zinato ####@####.#### Date: 26 Sep 2007 16:11:40 +0100 Message-Id: <46FA76A4.1020209@viscount.it> Carlo Zinato ha scritto: > Hi all, > > I'm using a truecolor 565 color framebuffer drawing graphics > exclusively in black and white, i.e. with GrSetGCBackground(gc, WHITE) > and GrSetGCForeground(gc, BLACK). Everything works fine in GR_MODE_COPY > and GR_MODE_COPYINVERTED (involving only src graphic), but when I use > any other mode which combines src and dst nothing is drawn. For example > if I draw in GR_MODE_XOR mode a black box somewhere over a bigger black > box nothing happens. Am I missing something? OK, I misunderstood how GR_MODE works: I thought logical operations consider foreground as 1 and background as 0. But they refer to actual pixel colors, so in my case WHITE is 1 (pixel is 0xFFFF) and BLACK is 0 (pixel is 0x0000). Solved problem inverting the logic (e.g. replaced GR_MODE_XOR with GR_MODE_EQUIV). Cheers, Carlo > > Thanks in advande, > Carlo > > --------------------------------------------------------------------- > To unsubscribe, e-mail: ####@####.#### > For additional commands, e-mail: ####@####.#### > > > | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
[<<] [<] Page 1 of 1 [>] [>>] |