From: root Date: Wed, 23 Jan 2008 14:33:42 +0000 (+0000) Subject: better document alpha handling, also shift the blame X-Git-Url: http://git.openbox.org/?a=commitdiff_plain;h=4dc6730e285e3e5610ca41445faeba1c9ef9337f;p=dana%2Furxvt.git better document alpha handling, also shift the blame --- diff --git a/Changes b/Changes index ae6308c1..c12c3320 100644 --- a/Changes +++ b/Changes @@ -17,8 +17,6 @@ WISH: load system-wide config file even if we don't have one WISH: look into XAddConnectionWatch, does anybody need that? DUMB: support tex fonts -DO NOT USE, CURRENTLY TOTALLY BROKEN W.R.T. XFT FONTS -TODO: document #aarrggbb or (better?) remove 9.0 - fix a crash bug where urxvtd would crash when urxvtc was called with wrong arguments (I wish debian maintainers in general would @@ -36,6 +34,7 @@ TODO: document #aarrggbb or (better?) remove - the 132/80 mode switch now forces a height of 24, too, and resets the terminal. - scrollbar code cleanups. + - removed (undocumented) #aarrggbb format. 8.9 Mon Dec 24 07:51:40 CET 2007 - fix the issue where urxvtd would not immediately close a window diff --git a/doc/rxvt.1.pod b/doc/rxvt.1.pod index 2e745537..91ec68dc 100644 --- a/doc/rxvt.1.pod +++ b/doc/rxvt.1.pod @@ -1455,29 +1455,51 @@ on White. =back -=head2 ALPHA CHANNEL SUPPORT +=head2 ALPHA CHANNEL SUPPORT / TRANSPARENT COLOURS If Xft support has been compiled in and as long as Xft/Xrender/X don't get -their act together, rxvt-unicode will support C -(recommended, but B have 4 digits/component) colour specifications, -in addition to the ones provided by X, where the additional A component -specifies opacity (alpha) values. The minimum value of C<0> is completely -transparent). You can also prefix any color with C<[percent]>, where -C is a decimal percentage (0-100) that specifies the opacity of -the color, where C<0> is completely transparent and C<100> is completelxy -opaque. - -You probably need to specify B<"-depth 32">, too, and have the luck that -your X-server uses ARGB pixel layout, as X is far from just supporting -ARGB visuals out of the box, and rxvt-unicode just fudges around. - -For example, the following selects an almost completely transparent red +their act together, rxvt-unicode will do it's own alpha channel management: + +You can prefix any color with an opaquenes percentage enclosed in +brackets, i.e. C<[percent]>, where C is a decimal percentage +(0-100) that specifies the opacity of the color, where C<0> is completely +transparent and C<100> is completely opaque. For example, C<[50]red> is a +half-transparent red, while C<[95]#00ff00> is an almost opaque green. This +is the recommended format to specify transparency values, and works with +all ways to specify a colour. + +For complete control, rxvt-unicode also supports +C (exactly four hex digits/component) colour +specifications, where the additional C component specifies opacity +(alpha) values. The minimum value of C<0000> is completely transparent, +while C is completely opaque). The two example colours from +earlier could also be specified as C and +C. + +You probably need to specify B<"-depth 32">, too, to force a visual with +alpha channels, and have the luck that your X-server uses ARGB pixel +layout, as X is far from just supporting ARGB visuals out of the box, and +rxvt-unicode just fudges around. + +For example, the following selects an almost completely transparent black background, and an almost opaque pink foreground: - @@RXVT_NAME@@ -depth 32 -bg rgba:0000/0000/0000/aaaa -fg "[80]pink" + @@RXVT_NAME@@ -depth 32 -bg rgba:0000/0000/0000/4444 -fg "[80]pink" -I +When not using a background image, then the interpretation of the +alpha channel is up to your compositing manager (most interpret it as +transparency of course). + +When using a background pixmap or pseudo-transparency, then the background +colour will always behave as if it were completely transparent (so the +background image shows instead), regardless of how it was specified, while +other colours will either be transparent as specified (the background +image will show through) on servers supporting the RENDER extension, or +fully opaque on servers not supporting the RENDER EXTENSION. + +Please note that due to bugs in Xft, specifying alpha values might result +in garbage being displayed when the X-server does not support the RENDER +extension. =head1 ENVIRONMENT