From e01f4240a3dc15fa147b22158212536698a12b95 Mon Sep 17 00:00:00 2001 From: lecoanet Date: Wed, 24 Oct 2001 13:12:12 +0000 Subject: Ajout d'un alpha aux groupes et expression de l'alpha en pourcent --- generic/Map.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'generic/Map.c') diff --git a/generic/Map.c b/generic/Map.c index ebf4525..12d953a 100644 --- a/generic/Map.c +++ b/generic/Map.c @@ -1281,6 +1281,7 @@ Render(Item item) unsigned int i, cnt; int line_width, new_width; XColor *color; + unsigned char alpha; if (map->map_info == NULL) { return; @@ -1288,7 +1289,8 @@ Render(Item item) map_info = map->map_info; color = map->color; - glColor4us(color->red, color->green, color->blue, map->alpha*65535/100); + alpha = map->alpha*wi->alpha*65535/100; + glColor4us(color->red, color->green, color->blue, alpha); if (map->filled) { if (ZnListSize(map->vectors) || ZnListSize(map->arcs)) { if (map->fill_pattern != ZnUnspecifiedPattern) { /* Fill stippled */ @@ -1453,7 +1455,7 @@ Render(Item item) p.x = points[i].x-(w+1.0)/2.0; p.y = points[i].y-(h+1.0)/2.0; RenderImage(wi, (ImageBits *) GetBitmapTexture(wi->dpy, sym), - color, map->alpha, &p); + color, alpha, &p); } } } @@ -1468,7 +1470,7 @@ Render(Item item) for (i = 0; i < cnt; i++, points++) { p.x = points->x-(w+1)/2; p.y = points->y-(h+1)/2; - RenderImage(wi, im_bits, color, map->alpha, &p); + RenderImage(wi, im_bits, color, alpha, &p); } } } -- cgit v1.1