A Discrete-Event Network Simulator
API
grid.Colors Class Reference

Colors class. More...

+ Collaboration diagram for grid.Colors:

Public Member Functions

def __init__ (self)
 Initializer. More...
 
def add (self, name, color)
 Add. More...
 
def lookup (self, name)
 Lookup name. More...
 

Static Public Attributes

list default_colors
 default colors XXX add more More...
 

Private Attributes

 __colors
 colors More...
 

Detailed Description

Colors class.

Definition at line 505 of file grid.py.

Constructor & Destructor Documentation

◆ __init__()

def grid.Colors.__init__ (   self)

Initializer.

Parameters
selfthis object

Definition at line 520 of file grid.py.

Member Function Documentation

◆ add()

def grid.Colors.add (   self,
  name,
  color 
)

Add.

Parameters
selfthis object
namename of the color
colorcolor value
Returns
none

Definition at line 526 of file grid.py.

References grid.Colors.__colors, and grid.TopLegendRenderer.__colors.

Referenced by grid.Colors.lookup().

+ Here is the caller graph for this function:

◆ lookup()

def grid.Colors.lookup (   self,
  name 
)

Lookup name.

Parameters
selfthis object
namename
Returns
named color

Definition at line 535 of file grid.py.

References grid.Colors.__colors, grid.TopLegendRenderer.__colors, nlohmann::detail::lexer< BasicJsonType, InputAdapterType >.add(), grid.Colors.add(), grid.Colors.default_colors, and nlohmann::detail.get().

+ Here is the call graph for this function:

Member Data Documentation

◆ __colors

grid.Colors.__colors
private

colors

Definition at line 524 of file grid.py.

Referenced by grid.Colors.add(), grid.TopLegendRenderer.draw(), and grid.Colors.lookup().

◆ default_colors

grid.Colors.default_colors
static
Initial value:
= [
Color(1, 0, 0),
Color(0, 1, 0),
Color(0, 0, 1),
Color(1, 1, 0),
Color(1, 0, 1),
Color(0, 1, 1),
]

default colors XXX add more

Definition at line 511 of file grid.py.

Referenced by grid.Colors.lookup().


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