Posterize to 8 colors when outer terminal does not support 256 colors

Fixes #58 github issue.
This commit is contained in:
Keith Winstein
2012-03-16 17:42:36 -04:00
parent bdb0ecc2fd
commit 170bc8366a
6 changed files with 96 additions and 7 deletions
+4
View File
@@ -54,9 +54,13 @@ namespace Terminal {
bool has_bce; /* erases result in cell filled with background color */
int posterize_colors; /* downsample input colors >8 to [0..7] */
void put_cell( bool initialized, FrameState &frame, const Framebuffer &f ) const;
public:
void downgrade( Framebuffer &f ) const { if ( posterize_colors ) { f.posterize(); } }
std::string new_frame( bool initialized, const Framebuffer &last, const Framebuffer &f ) const;
Display( bool use_environment );