Otawa  0.10
otawa::display::Color Class Reference

A color description. More...

#include <otawa/display/display.h>

Public Types

typedef t::uint8 comp_t
 

Public Member Functions

 Color (void)
 
 Color (comp_t red, comp_t green, comp_t blue)
 Build a color from its components. More...
 
 Color (t::uint32 color)
 Build a color from its RGB value. More...
 
 Color (string name)
 Create a color by its name. More...
 
const stringasText (void) const
 

Private Attributes

string text
 

Detailed Description

A color description.

Member Typedef Documentation

Constructor & Destructor Documentation

otawa::display::Color::Color ( void  )
inline
otawa::display::Color::Color ( comp_t  red,
comp_t  green,
comp_t  blue 
)

Build a color from its components.

Parameters
redRed component.
greenGreen component.
blueBlue component.

References elm::_, and otawa::display::hex2().

otawa::display::Color::Color ( t::uint32  color)

Build a color from its RGB value.

Parameters
colorRGB value (bits 23-16: red, bits 15-8: green, bits 7..0: blue).

References elm::_, elm::io::hex(), elm::io::pad(), and elm::io::width().

otawa::display::Color::Color ( string  name)

Create a color by its name.

Parameters
nameName of the color.

References name.

Member Function Documentation

const string& otawa::display::Color::asText ( void  ) const
inline

Member Data Documentation

string otawa::display::Color::text
private

The documentation for this class was generated from the following files: