The ZX Ecosystem v5.1.0;_GUI_v3.1.0
Loading...
Searching...
No Matches
Namespaces | Classes | Enumerations | Enumerator
The ZX color system

Description

These classes provide support for the ZX color system.

NOTE:

-These classes are not thread-safe.

http://jafma.net

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Collaboration diagram for The ZX color system:

Namespaces

namespace  zxeco
 The main namespace of the library, that spans across all the zx modules.
 

Classes

class  zxeco::Flash
 A value of flash that is different to the same value of bright, inv or over. More...
 
class  zxeco::Bright
 A value of bright that is different to the same value of flash, inv or over. More...
 
class  zxeco::Inverse
 A value of inv that is different to the same value of flash, bright or over. More...
 
class  zxeco::Over
 A value of over that is different to the same value of flash, bright or inv. More...
 
class  zxeco::BasicColor
 One of the 8 basic colors of the ZX, not considering bright or flash. More...
 
class  zxeco::BrightColor
 A basic color plus a bright level (on / off). More...
 
class  zxeco::PrintColor
 A BasicColor or CONTRAST or TRANSPARENT, but not with bright or flash. More...
 
class  zxeco::Paper
 A printcolor for paper as a different type from a color for ink. More...
 
class  zxeco::Ink
 A printcolor for ink as a different type from a color for paper. More...
 
class  zxeco::AttrColors
 Complete color specification for an attr (character) cell on the zx screen. More...
 
class  zxeco::Colors
 Color specification for a character cell, plus modes of printing. More...
 

Enumerations

enum  zxeco::ColorBaseType : uint8_t {
  BLACK = 0 , BLUE , RED , MAGENTA ,
  GREEN , CYAN , YELLOW , zxeco::WHITE ,
  zxeco::NUMBASICCOLORS , zxeco::TRANSPARENT = NUMBASICCOLORS , zxeco::CONTRAST , NUMPRINTCOLORS
}
 Main color constants. More...
 

Class Documentation

◆ zxeco::Flash

class zxeco::Flash

A value of flash that is different to the same value of bright, inv or over.

Definition at line 82 of file ZXColors.h.

Public Member Functions

 Flash (ColorModVal cmv)
 
 Flash (bool f=true)
 
 operator ColorModVal (void) const noexcept
 

Constructor & Destructor Documentation

◆ Flash()

zxeco::Flash::Flash ( bool  f = true)
inlineexplicit

Definition at line 87 of file ZXColors.h.

Member Function Documentation

◆ operator ColorModVal()

zxeco::Flash::operator ColorModVal ( void  ) const
inlinenoexcept

Definition at line 89 of file ZXColors.h.

◆ zxeco::Bright

class zxeco::Bright

A value of bright that is different to the same value of flash, inv or over.

Definition at line 99 of file ZXColors.h.

Public Member Functions

 Bright (ColorModVal cmv)
 
 Bright (bool b=true)
 
 operator ColorModVal (void) const noexcept
 

Constructor & Destructor Documentation

◆ Bright()

zxeco::Bright::Bright ( bool  b = true)
inlineexplicit

Definition at line 104 of file ZXColors.h.

Member Function Documentation

◆ operator ColorModVal()

zxeco::Bright::operator ColorModVal ( void  ) const
inlinenoexcept

Definition at line 106 of file ZXColors.h.

◆ zxeco::Inverse

class zxeco::Inverse

A value of inv that is different to the same value of flash, bright or over.

Definition at line 116 of file ZXColors.h.

Public Member Functions

 Inverse (ColorModVal cmv)
 
 Inverse (bool i=true)
 
 operator ColorModVal (void) const noexcept
 

Constructor & Destructor Documentation

◆ Inverse()

zxeco::Inverse::Inverse ( bool  i = true)
inlineexplicit

Definition at line 121 of file ZXColors.h.

Member Function Documentation

◆ operator ColorModVal()

zxeco::Inverse::operator ColorModVal ( void  ) const
inlinenoexcept

Definition at line 123 of file ZXColors.h.

◆ zxeco::Over

class zxeco::Over

A value of over that is different to the same value of flash, bright or inv.

Definition at line 133 of file ZXColors.h.

Public Member Functions

 Over (ColorModVal cmv)
 
 Over (bool o=true)
 
 operator ColorModVal (void) const noexcept
 

Constructor & Destructor Documentation

◆ Over()

zxeco::Over::Over ( bool  o = true)
inlineexplicit

Definition at line 138 of file ZXColors.h.

Member Function Documentation

◆ operator ColorModVal()

zxeco::Over::operator ColorModVal ( void  ) const
inlinenoexcept

Definition at line 140 of file ZXColors.h.

◆ zxeco::BasicColor

class zxeco::BasicColor

One of the 8 basic colors of the ZX, not considering bright or flash.

Definition at line 153 of file ZXColors.h.

Public Member Functions

 BasicColor (ColorBaseType cbt=BLACK)
 Default constructor from a given base color. More...
 
 operator ColorBaseType (void) const noexcept
 Conversion to ColorBaseType. More...
 
BasicColor contrasting (void) const noexcept
 Return the basic color that contrasts with this one. More...
 
void setNext (bool circular=true)
 Set this color to the next basic color. More...
 
std::string to_string (void) const
 Return the name for this color.
 

Constructor & Destructor Documentation

◆ BasicColor()

zxeco::BasicColor::BasicColor ( ColorBaseType  cbt = BLACK)

Default constructor from a given base color.

This conversion constructor allows for using simply BLACK in an expression that expects a BasicColor. Throws if CBT is out of range.

Member Function Documentation

◆ operator ColorBaseType()

zxeco::BasicColor::operator ColorBaseType ( void  ) const
inlinenoexcept

Conversion to ColorBaseType.

This operator allows for using a BasicColor object in any expression expecting a ColorBaseType, e.g., for checking equallity of a BasicColor to any of the BLACK, BLUE, etc. constants.

Definition at line 165 of file ZXColors.h.

◆ contrasting()

BasicColor zxeco::BasicColor::contrasting ( void  ) const
inlinenoexcept

Return the basic color that contrasts with this one.

Definition at line 170 of file ZXColors.h.

◆ setNext()

void zxeco::BasicColor::setNext ( bool  circular = true)

Set this color to the next basic color.

Set it to the next basic color, maybe in a circular way (otherwise, raise an exception when reaching the last color).

◆ zxeco::BrightColor

class zxeco::BrightColor

A basic color plus a bright level (on / off).

This class also relates such a color with info about its RGB components and allows to consider all the bright colors in a linear sequence.

Definition at line 194 of file ZXColors.h.

Static Public Attributes

static constexpr RGBPalette::Size NUMLINEARCOLORS = NUMBASICCOLORS * 2
 Number of linear colors. Black is counted twice, being equal w & w/o br. More...
 
static constexpr RGBPalette::Index FIRSTLINEARCOLORWBRIGHT = NUMBASICCOLORS
 First linear color that has bright. More...
 

Public Member Functions

 BrightColor (BasicColor bc=BLACK, bool br=false)
 Default constructor and constructor from BasicColor. More...
 
 BrightColor (RGBPalette::Index li)
 Constructor from a linear index, from 0 to NUMLINEARCOLORS-1. More...
 
 BrightColor (const RGBColor &col)
 Constructor from a rgb color. More...
 
BasicColor color (void) const noexcept
 Get the basic color. More...
 
bool bright (void) const noexcept
 Get the bright level. More...
 
RGBPalette::Index linear (void) const noexcept
 Return the index of this color in the ZX palette. More...
 
const RGBColorrgbColor (void) const noexcept
 Return the RGBColor used to define this BrightColor. More...
 
std::string to_string (void) const
 Return a descriptive string for this color.
 

Constructor & Destructor Documentation

◆ BrightColor() [1/3]

zxeco::BrightColor::BrightColor ( BasicColor  bc = BLACK,
bool  br = false 
)
inline

Default constructor and constructor from BasicColor.

Definition at line 208 of file ZXColors.h.

◆ BrightColor() [2/3]

zxeco::BrightColor::BrightColor ( RGBPalette::Index  li)

Constructor from a linear index, from 0 to NUMLINEARCOLORS-1.

Raise an exception if the index is invalid.

◆ BrightColor() [3/3]

zxeco::BrightColor::BrightColor ( const RGBColor col)
inline

Constructor from a rgb color.

Get the nearest ZX color to RGB.

Definition at line 216 of file ZXColors.h.

Member Function Documentation

◆ color()

BasicColor zxeco::BrightColor::color ( void  ) const
inlinenoexcept

Get the basic color.

Definition at line 223 of file ZXColors.h.

◆ bright()

bool zxeco::BrightColor::bright ( void  ) const
inlinenoexcept

Get the bright level.

Definition at line 226 of file ZXColors.h.

◆ linear()

RGBPalette::Index zxeco::BrightColor::linear ( void  ) const
inlinenoexcept

Return the index of this color in the ZX palette.

Undefined result if bright is transparent.

Definition at line 229 of file ZXColors.h.

◆ rgbColor()

const RGBColor & zxeco::BrightColor::rgbColor ( void  ) const
inlinenoexcept

Return the RGBColor used to define this BrightColor.

The returned RGBColor is static and therefore it always exists.

Definition at line 234 of file ZXColors.h.

Member Data Documentation

◆ NUMLINEARCOLORS

constexpr RGBPalette::Size zxeco::BrightColor::NUMLINEARCOLORS = NUMBASICCOLORS * 2
staticconstexpr

Number of linear colors. Black is counted twice, being equal w & w/o br.

Definition at line 201 of file ZXColors.h.

◆ FIRSTLINEARCOLORWBRIGHT

constexpr RGBPalette::Index zxeco::BrightColor::FIRSTLINEARCOLORWBRIGHT = NUMBASICCOLORS
staticconstexpr

First linear color that has bright.

Definition at line 204 of file ZXColors.h.

◆ zxeco::PrintColor

class zxeco::PrintColor

A BasicColor or CONTRAST or TRANSPARENT, but not with bright or flash.

Definition at line 254 of file ZXColors.h.

Inheritance diagram for zxeco::PrintColor:

Public Member Functions

 PrintColor (ColorBaseType cbt=BLACK)
 Default constructor and from a constant color. Call base constructor. More...
 
 PrintColor (const BasicColor &bc) noexcept
 Constructor from the corresponding BasicColor. More...
 
 operator ColorBaseType (void) const noexcept
 Conversion to ColorBaseType. More...
 
BasicColor basic (void) const
 Conversion to BasicColor, if a valid one; otherwise, exception.
 
bool isBasic (void) const noexcept
 Return TRUE if the color is a basic one and not CONTRAST or TRANSP. More...
 
std::string to_string (void) const
 Return a descriptive text of the color.
 

Constructor & Destructor Documentation

◆ PrintColor() [1/2]

zxeco::PrintColor::PrintColor ( ColorBaseType  cbt = BLACK)

Default constructor and from a constant color. Call base constructor.

This conversion constructor allows to use the constant (BLACK, BLUE, ...) in any expression expecting a PrintColor.

◆ PrintColor() [2/2]

zxeco::PrintColor::PrintColor ( const BasicColor bc)
inlinenoexcept

Constructor from the corresponding BasicColor.

This conversion constructor allows to use a BasicColor in any expression expecting a PrintColor.

Definition at line 263 of file ZXColors.h.

Member Function Documentation

◆ operator ColorBaseType()

zxeco::PrintColor::operator ColorBaseType ( void  ) const
inlinenoexcept

Conversion to ColorBaseType.

This operator allows to use a PrintColor in expressions expecting a constant (BLACK, BLUE, ...).

Definition at line 270 of file ZXColors.h.

◆ isBasic()

bool zxeco::PrintColor::isBasic ( void  ) const
inlinenoexcept

Return TRUE if the color is a basic one and not CONTRAST or TRANSP.

Definition at line 277 of file ZXColors.h.

◆ zxeco::Paper

class zxeco::Paper

A printcolor for paper as a different type from a color for ink.

Definition at line 292 of file ZXColors.h.

Inheritance diagram for zxeco::Paper:
Collaboration diagram for zxeco::Paper:

Public Member Functions

 Paper (PrintColor p)
 
- Public Member Functions inherited from zxeco::PrintColor
 PrintColor (ColorBaseType cbt=BLACK)
 Default constructor and from a constant color. Call base constructor. More...
 
 PrintColor (const BasicColor &bc) noexcept
 Constructor from the corresponding BasicColor. More...
 
 operator ColorBaseType (void) const noexcept
 Conversion to ColorBaseType. More...
 
BasicColor basic (void) const
 Conversion to BasicColor, if a valid one; otherwise, exception.
 
bool isBasic (void) const noexcept
 Return TRUE if the color is a basic one and not CONTRAST or TRANSP. More...
 
std::string to_string (void) const
 Return a descriptive text of the color.
 

Constructor & Destructor Documentation

◆ Paper()

zxeco::Paper::Paper ( PrintColor  p)
inlineexplicit

Definition at line 296 of file ZXColors.h.

◆ zxeco::Ink

class zxeco::Ink

A printcolor for ink as a different type from a color for paper.

Definition at line 301 of file ZXColors.h.

Inheritance diagram for zxeco::Ink:
Collaboration diagram for zxeco::Ink:

Public Member Functions

 Ink (PrintColor p)
 
- Public Member Functions inherited from zxeco::PrintColor
 PrintColor (ColorBaseType cbt=BLACK)
 Default constructor and from a constant color. Call base constructor. More...
 
 PrintColor (const BasicColor &bc) noexcept
 Constructor from the corresponding BasicColor. More...
 
 operator ColorBaseType (void) const noexcept
 Conversion to ColorBaseType. More...
 
BasicColor basic (void) const
 Conversion to BasicColor, if a valid one; otherwise, exception.
 
bool isBasic (void) const noexcept
 Return TRUE if the color is a basic one and not CONTRAST or TRANSP. More...
 
std::string to_string (void) const
 Return a descriptive text of the color.
 

Constructor & Destructor Documentation

◆ Ink()

zxeco::Ink::Ink ( PrintColor  p)
inlineexplicit

Definition at line 305 of file ZXColors.h.

◆ zxeco::AttrColors

class zxeco::AttrColors

Complete color specification for an attr (character) cell on the zx screen.

It contains: flash, bright, paper and ink, with the two latter being PrintColor and all supporting TRANSPARENT values.

Definition at line 314 of file ZXColors.h.

Inheritance diagram for zxeco::AttrColors:

Public Member Functions

 AttrColors (void)
 Default constructor: no bright, no flash, black ink, white paper. More...
 
 AttrColors (Flash f, Bright b, Paper p, Ink i)
 Constructor from elements. More...
 
 AttrColors (uint8_t attr)
 Constructor from the byte that contains the screen attribute.
 
uint8_t toAttr (void) const
 Convert the color specification into a byte for the attribute screen. More...
 
ColorModVal flash (void) const noexcept
 Get the flash element. More...
 
ColorModVal bright (void) const noexcept
 Get the bright element. More...
 
PrintColor paper (void) const noexcept
 Get the paper element. More...
 
PrintColor ink (void) const noexcept
 Get the ink element. More...
 
bool rgb (RGBColor &ink, RGBColor &paper) const
 Get RGB colors for this attribute and return flash.
 
void setFlash (ColorModVal f) noexcept
 Change the flash element. More...
 
void setFlash (bool f=true) noexcept
 < Change the flash element to one of ON or OFF. More...
 
void setBright (ColorModVal b) noexcept
 Change the bright element. More...
 
void setBright (bool b=true) noexcept
 < Change the bright element to one of ON or OFF. More...
 
void setPaper (PrintColor p) noexcept
 Change the paper element. More...
 
void setInk (PrintColor i) noexcept
 Change the ink element. More...
 
void swapPaperAndInk (void) noexcept
 Swap paper and ink. More...
 
AttrColors swapped (void) const noexcept
 < Return a version of these colors but with ink and paper swapped. More...
 
void adjustByExisting (const AttrColors &ex)
 Change this attrs as though the ZX would use them for printing on EX. More...
 
std::string to_string (bool shorttxt=false) const
 Return a descriptive text of this color specification.
 

Constructor & Destructor Documentation

◆ AttrColors() [1/2]

zxeco::AttrColors::AttrColors ( void  )
inline

Default constructor: no bright, no flash, black ink, white paper.

Definition at line 320 of file ZXColors.h.

◆ AttrColors() [2/2]

zxeco::AttrColors::AttrColors ( Flash  f,
Bright  b,
Paper  p,
Ink  i 
)
inline

Constructor from elements.

Definition at line 323 of file ZXColors.h.

Member Function Documentation

◆ toAttr()

uint8_t zxeco::AttrColors::toAttr ( void  ) const

Convert the color specification into a byte for the attribute screen.

CONTRAST and TRANSPARENT colors, and TRANSPARENT bright/flash, produce exception.

◆ flash()

ColorModVal zxeco::AttrColors::flash ( void  ) const
inlinenoexcept

Get the flash element.

Definition at line 339 of file ZXColors.h.

◆ bright()

ColorModVal zxeco::AttrColors::bright ( void  ) const
inlinenoexcept

Get the bright element.

Definition at line 342 of file ZXColors.h.

◆ paper()

PrintColor zxeco::AttrColors::paper ( void  ) const
inlinenoexcept

Get the paper element.

Definition at line 345 of file ZXColors.h.

◆ ink()

PrintColor zxeco::AttrColors::ink ( void  ) const
inlinenoexcept

Get the ink element.

Definition at line 348 of file ZXColors.h.

◆ setFlash() [1/2]

void zxeco::AttrColors::setFlash ( ColorModVal  f)
inlinenoexcept

Change the flash element.

Definition at line 354 of file ZXColors.h.

◆ setFlash() [2/2]

void zxeco::AttrColors::setFlash ( bool  f = true)
inlinenoexcept

< Change the flash element to one of ON or OFF.

Definition at line 357 of file ZXColors.h.

◆ setBright() [1/2]

void zxeco::AttrColors::setBright ( ColorModVal  b)
inlinenoexcept

Change the bright element.

Definition at line 361 of file ZXColors.h.

◆ setBright() [2/2]

void zxeco::AttrColors::setBright ( bool  b = true)
inlinenoexcept

< Change the bright element to one of ON or OFF.

Definition at line 364 of file ZXColors.h.

◆ setPaper()

void zxeco::AttrColors::setPaper ( PrintColor  p)
inlinenoexcept

Change the paper element.

Definition at line 368 of file ZXColors.h.

◆ setInk()

void zxeco::AttrColors::setInk ( PrintColor  i)
inlinenoexcept

Change the ink element.

Definition at line 371 of file ZXColors.h.

◆ swapPaperAndInk()

void zxeco::AttrColors::swapPaperAndInk ( void  )
inlinenoexcept

Swap paper and ink.

Definition at line 374 of file ZXColors.h.

◆ swapped()

AttrColors zxeco::AttrColors::swapped ( void  ) const
inlinenoexcept

< Return a version of these colors but with ink and paper swapped.

Definition at line 377 of file ZXColors.h.

◆ adjustByExisting()

void zxeco::AttrColors::adjustByExisting ( const AttrColors ex)

Change this attrs as though the ZX would use them for printing on EX.

This method works as the original ZX when printing with certain attrs (the ones in this object) on a character cell that has others (the ones in EX), i.e., this method changes transparencies and constrasts by concrete colors according to the ones in EX.

According to original ZX behaviour of printing (0x0dbd ROM, in this very sequence):

1.- Substitute ink 8 by ex.ink and paper 8 by ex.paper
2.- If paper == 9, substitute paper 9 by contrast of ink (if ink == 9,
    then set ink to BLACK before that).
3.- If ink == 9, substitute ink 9 by contrast of paper.
4.- If bright == 8, substitute it by ex.bright
5.- If flash == 8, substitute it by ex.flash

For drawing, the same is done but only ink is taken from the desired colors.

Exceptions are thrown if EX contains non-basic colors.

◆ zxeco::Colors

class zxeco::Colors

Color specification for a character cell, plus modes of printing.

Contains an AttrColors object plus the inverse and over modes of printing.

Definition at line 419 of file ZXColors.h.

Inheritance diagram for zxeco::Colors:
Collaboration diagram for zxeco::Colors:

Public Member Functions

 Colors (void)
 Default constructor: default color attribute plus no inverse or over. More...
 
 Colors (AttrColors cc, Inverse inv, Over ov)
 Constructor from an attribute specification plus inverse and over. More...
 
ColorModVal inverse (void) const noexcept
 Get the inverse mode. More...
 
void setInverse (ColorModVal inv) noexcept
 Change the inverse mode. More...
 
void setInverse (bool i=true) noexcept
 < Change the inverse element to one of ON or OFF. More...
 
ColorModVal over (void) const noexcept
 Get the over mode. More...
 
void setOver (ColorModVal ov) noexcept
 Change the over mode. More...
 
void setOver (bool o=true) noexcept
 Change the over element to one of ON or OFF. More...
 
Colorsoperator<< (Paper p) noexcept
 
Colorsoperator<< (Ink i) noexcept
 
Colorsoperator<< (Bright b) noexcept
 
Colorsoperator<< (Flash f) noexcept
 
Colorsoperator<< (Inverse f) noexcept
 
Colorsoperator<< (Over o) noexcept
 
std::string to_string (void) const
 Return a text with the information of the colors. More...
 
- Public Member Functions inherited from zxeco::AttrColors
 AttrColors (void)
 Default constructor: no bright, no flash, black ink, white paper. More...
 
 AttrColors (Flash f, Bright b, Paper p, Ink i)
 Constructor from elements. More...
 
 AttrColors (uint8_t attr)
 Constructor from the byte that contains the screen attribute.
 
uint8_t toAttr (void) const
 Convert the color specification into a byte for the attribute screen. More...
 
ColorModVal flash (void) const noexcept
 Get the flash element. More...
 
ColorModVal bright (void) const noexcept
 Get the bright element. More...
 
PrintColor paper (void) const noexcept
 Get the paper element. More...
 
PrintColor ink (void) const noexcept
 Get the ink element. More...
 
bool rgb (RGBColor &ink, RGBColor &paper) const
 Get RGB colors for this attribute and return flash.
 
void setFlash (ColorModVal f) noexcept
 Change the flash element. More...
 
void setFlash (bool f=true) noexcept
 < Change the flash element to one of ON or OFF. More...
 
void setBright (ColorModVal b) noexcept
 Change the bright element. More...
 
void setBright (bool b=true) noexcept
 < Change the bright element to one of ON or OFF. More...
 
void setPaper (PrintColor p) noexcept
 Change the paper element. More...
 
void setInk (PrintColor i) noexcept
 Change the ink element. More...
 
void swapPaperAndInk (void) noexcept
 Swap paper and ink. More...
 
AttrColors swapped (void) const noexcept
 < Return a version of these colors but with ink and paper swapped. More...
 
void adjustByExisting (const AttrColors &ex)
 Change this attrs as though the ZX would use them for printing on EX. More...
 
std::string to_string (bool shorttxt=false) const
 Return a descriptive text of this color specification.
 

Constructor & Destructor Documentation

◆ Colors() [1/2]

zxeco::Colors::Colors ( void  )
inline

Default constructor: default color attribute plus no inverse or over.

Definition at line 423 of file ZXColors.h.

◆ Colors() [2/2]

zxeco::Colors::Colors ( AttrColors  cc,
Inverse  inv,
Over  ov 
)
inline

Constructor from an attribute specification plus inverse and over.

Definition at line 426 of file ZXColors.h.

Member Function Documentation

◆ inverse()

ColorModVal zxeco::Colors::inverse ( void  ) const
inlinenoexcept

Get the inverse mode.

Definition at line 431 of file ZXColors.h.

◆ setInverse() [1/2]

void zxeco::Colors::setInverse ( ColorModVal  inv)
inlinenoexcept

Change the inverse mode.

Definition at line 434 of file ZXColors.h.

◆ setInverse() [2/2]

void zxeco::Colors::setInverse ( bool  i = true)
inlinenoexcept

< Change the inverse element to one of ON or OFF.

Definition at line 437 of file ZXColors.h.

◆ over()

ColorModVal zxeco::Colors::over ( void  ) const
inlinenoexcept

Get the over mode.

Definition at line 441 of file ZXColors.h.

◆ setOver() [1/2]

void zxeco::Colors::setOver ( ColorModVal  ov)
inlinenoexcept

Change the over mode.

Definition at line 444 of file ZXColors.h.

◆ setOver() [2/2]

void zxeco::Colors::setOver ( bool  o = true)
inlinenoexcept

Change the over element to one of ON or OFF.

Definition at line 447 of file ZXColors.h.

◆ operator<<() [1/6]

Colors & zxeco::Colors::operator<< ( Paper  p)
inlinenoexcept

Definition at line 450 of file ZXColors.h.

◆ operator<<() [2/6]

Colors & zxeco::Colors::operator<< ( Ink  i)
inlinenoexcept

Definition at line 451 of file ZXColors.h.

◆ operator<<() [3/6]

Colors & zxeco::Colors::operator<< ( Bright  b)
inlinenoexcept

Definition at line 452 of file ZXColors.h.

◆ operator<<() [4/6]

Colors & zxeco::Colors::operator<< ( Flash  f)
inlinenoexcept

Definition at line 453 of file ZXColors.h.

◆ operator<<() [5/6]

Colors & zxeco::Colors::operator<< ( Inverse  f)
inlinenoexcept

Definition at line 454 of file ZXColors.h.

◆ operator<<() [6/6]

Colors & zxeco::Colors::operator<< ( Over  o)
inlinenoexcept

Definition at line 455 of file ZXColors.h.

◆ to_string()

std::string zxeco::Colors::to_string ( void  ) const
inline

Return a text with the information of the colors.

Definition at line 457 of file ZXColors.h.

Enumeration Type Documentation

◆ ColorBaseType

enum zxeco::ColorBaseType : uint8_t

#include <ZXColors.h>

Main color constants.

Enumerator
WHITE 

A basic color.

NUMBASICCOLORS 

Number of basic colors.

TRANSPARENT 

Setting ink or paper to this will print characters without changing the corresponding attribute existing at that position.

CONTRAST 

Setting paper or ink to this make the corresponding color to be in contrast to the other (i.e., either BLACK or WHITE).

Definition at line 46 of file ZXColors.h.