Menu

#536 Transparent line colors

closed-accepted
nobody
None
5
2012-04-14
2011-04-14
No

Proof-of-principle patch to support transparent lines using \"linecolor rgb \'#AARRGGBB\'\".

For compatibility with 24-bit rgb colors, the alpha value AA runs from 0=opaque to 255 (ff) = transparent. Implemented only for the cairo, svg, and canvas terminals.

Limitations:
- not possible for gd.trm, x11,trm, post.trm, most others
- existing rgb_color structures do not explicitly set alpha to 0.,
so there may be problems with uninitialized alpha values
- only checked for lines; effect on text colors may be inconsistent
- does not replace fill style TRANSPARENT_SOLID, since some
terminals (libgd) can draw transparent fill but not transparent lines

Discussion

  • Ethan Merritt

    Ethan Merritt - 2011-04-14

    transparent line colors

     
  • Bastian Märkisch

    For the windows terminal this is possible after a (partial) switch from the currently used GDI API to GDI+. This is also required for antialiasing. It can be done step by step and is rather straightforward.

     
  • Ethan Merritt

    Ethan Merritt - 2012-04-14

    Added to 4.7 CVS.

    Curiously, this required no change to the core code other than to make sure that 32-bit colors are treated as (unsigned int) rather than (int).

    Full support for qt wxt cairo svg canvas
    Partial support for gd
    Not yet implemented for lua, but it looks possible

     
  • Ethan Merritt

    Ethan Merritt - 2012-04-14
    • status: open --> closed-accepted
     

Log in to post a comment.

MongoDB Logo MongoDB