diff options
author | lecoanet | 2001-10-24 13:12:12 +0000 |
---|---|---|
committer | lecoanet | 2001-10-24 13:12:12 +0000 |
commit | e01f4240a3dc15fa147b22158212536698a12b95 (patch) | |
tree | e47faa6b7139082f9c3c526e8b17b400c24c824d /generic/Map.c | |
parent | 615729a337312d54e20b88624c88c0c02707b4c7 (diff) | |
download | tkzinc-e01f4240a3dc15fa147b22158212536698a12b95.zip tkzinc-e01f4240a3dc15fa147b22158212536698a12b95.tar.gz tkzinc-e01f4240a3dc15fa147b22158212536698a12b95.tar.bz2 tkzinc-e01f4240a3dc15fa147b22158212536698a12b95.tar.xz |
Ajout d'un alpha aux groupes et expression de l'alpha en pourcent
Diffstat (limited to 'generic/Map.c')
-rw-r--r-- | generic/Map.c | 8 |
1 files changed, 5 insertions, 3 deletions
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); } } } |