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/Rectangle.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/Rectangle.c')
-rw-r--r-- | generic/Rectangle.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/generic/Rectangle.c b/generic/Rectangle.c index 6a5ea69..841a48e 100644 --- a/generic/Rectangle.c +++ b/generic/Rectangle.c @@ -732,7 +732,8 @@ Render(Item item) glPolygonStipple(GetBitmapMask(wi->dpy, rect->fill_pattern)->pixels); } color = ZnGetGradientColor(wi->win, rect->fill_color, 0.0, &alpha); - glColor4us(color->red, color->green, color->blue, alpha*65535/100); + alpha = (alpha*wi->alpha/100)*65535/100; + glColor4us(color->red, color->green, color->blue, alpha); RectRenderCB(rect); glDisable(GL_POLYGON_STIPPLE); } @@ -752,7 +753,8 @@ Render(Item item) } else { color = rect->line_color; - glColor4us(color->red, color->green, color->blue, rect->line_alpha*65535/100); + alpha = rect->line_alpha*wi->alpha/100*65535/100; + glColor4us(color->red, color->green, color->blue, alpha); if (rect->line_width < 3) { SetLineStyle(wi, rect->line_style); glLineWidth(rect->line_width); |