Index:
[thread]
[date]
[subject]
[author]
From: becka@rz.uni-duesseldorf.de
To : ggi-develop@eskimo.com
Date: Tue, 20 Apr 1999 16:07:38 +0200 (MET DST)
Re: GGI help
Hi !
> I realized this ;), but i don't get how i put coloured pixels
> onto the visual in 24/32 bit mode.. do you know how? :)
You don't have to set a palette unless you are in a palettized mode.
Doing so yields undefined results. You usually do
if (GT_SCHEME(mode.graphtype) == GT_PALETTE) {
ggiSetColorfulPalette(vis);
ggiGetPalette(vis, 0, 1<<depth, pal);
}
for programs that don't really care about the exact mode they run on.
To put colored pixels, you first do something like
map[0].r=0xFFFF; /* this is the highest intensity value for the red part. */
map[0].g=0xFFFF;
map[0].b=0xFFFF;
white=ggiMapColor(vis, &map[0]);
To obtain the pixel-value, which you can then use with the pixel arguments
of ggiPut* and GCSet[Fore/Back]ground.
CU, Andy
--
Andreas Beck | Email : <Andreas.Beck@ggi-project.org>
Index:
[thread]
[date]
[subject]
[author]