LCOV - code coverage report
Current view: top level - util/cgm - CubitColor.hpp (source / functions) Hit Total Coverage
Test: coverage_sk.info Lines: 18 18 100.0 %
Date: 2020-06-30 00:58:45 Functions: 0 0 -
Branches: 0 0 -

           Branch data     Line data    Source code
       1                 :            : #ifndef CUBIT_COLOR_HPP
       2                 :            : #define CUBIT_COLOR_HPP
       3                 :            : 
       4                 :            : #include "CGMUtilConfigure.h"
       5                 :            : 
       6                 :            : //! CubitColor class to represent RGBA colors.
       7                 :            : //! Values are unsigned chars with a range of 0 to 255.
       8                 :            : struct CUBIT_UTIL_EXPORT CubitColor
       9                 :            : {
      10                 :            :   CubitColor();
      11                 :            :   CubitColor(unsigned char r, unsigned char g, unsigned char b, unsigned char a=255);
      12                 :            :   CubitColor(const CubitColor& other);
      13                 :            : 
      14                 :            :   bool operator==(const CubitColor& other) const;
      15                 :            : 
      16                 :            :   bool operator!=(const CubitColor& other) const;
      17                 :            : 
      18                 :            :   //! create a CubitColor from double r,g,b. double value is between 0.0 and 1.0.
      19                 :            :   static CubitColor rgb_from_double(double r, double g, double b, double a=1.0);
      20                 :            : 
      21                 :            :   unsigned char red;
      22                 :            :   unsigned char green;
      23                 :            :   unsigned char blue;
      24                 :            :   unsigned char alpha;
      25                 :            : };
      26                 :            : 
      27                 :            : 
      28                 :     243873 : const CubitColor CUBIT_DEFAULT_COLOR = CubitColor();
      29                 :     243873 : const CubitColor CUBIT_BLACK         = CubitColor(0,0,0);
      30                 :     243873 : const CubitColor CUBIT_GREY          = CubitColor(127,127,127);
      31                 :     243873 : const CubitColor CUBIT_ORANGE        = CubitColor(255,165,0);
      32                 :     243873 : const CubitColor CUBIT_RED           = CubitColor(255,0,0);
      33                 :     243873 : const CubitColor CUBIT_GREEN         = CubitColor(0,255,0);
      34                 :     243873 : const CubitColor CUBIT_YELLOW        = CubitColor(255,255,0);
      35                 :     243873 : const CubitColor CUBIT_MAGENTA       = CubitColor(255,0,255);
      36                 :     243873 : const CubitColor CUBIT_CYAN          = CubitColor(0,255,255);
      37                 :     243873 : const CubitColor CUBIT_BLUE          = CubitColor(0,0,255);
      38                 :     243873 : const CubitColor CUBIT_WHITE         = CubitColor(255,255,255);
      39                 :     243873 : const CubitColor CUBIT_BROWN         = CubitColor(165,42,42);
      40                 :     243873 : const CubitColor CUBIT_GOLD          = CubitColor(255,215,0);
      41                 :     243873 : const CubitColor CUBIT_LIGHTBLUE     = CubitColor(173,216,230);
      42                 :     243873 : const CubitColor CUBIT_LIGHTGREEN    = CubitColor(0,204,0);
      43                 :     243873 : const CubitColor CUBIT_SALMON        = CubitColor(250,128,114);
      44                 :     243873 : const CubitColor CUBIT_CORAL         = CubitColor(255,127,80);
      45                 :     243873 : const CubitColor CUBIT_PINK          = CubitColor(255,192,203);
      46                 :            : 
      47                 :            : const int CUBIT_DEFAULT_COLOR_INDEX = -1;
      48                 :            : const int CUBIT_BLACK_INDEX         =  0;
      49                 :            : const int CUBIT_GREY_INDEX          =  1;
      50                 :            : const int CUBIT_ORANGE_INDEX        =  2;
      51                 :            : const int CUBIT_RED_INDEX           =  3;
      52                 :            : const int CUBIT_GREEN_INDEX         =  4;
      53                 :            : const int CUBIT_YELLOW_INDEX        =  5;
      54                 :            : const int CUBIT_MAGENTA_INDEX       =  6;
      55                 :            : const int CUBIT_CYAN_INDEX          =  7;
      56                 :            : const int CUBIT_BLUE_INDEX          =  8;
      57                 :            : const int CUBIT_WHITE_INDEX         =  9;
      58                 :            : const int CUBIT_BROWN_INDEX         = 10;
      59                 :            : const int CUBIT_GOLD_INDEX          = 11;
      60                 :            : const int CUBIT_LIGHTBLUE_INDEX     = 12;
      61                 :            : const int CUBIT_LIGHTGREEN_INDEX    = 13;
      62                 :            : const int CUBIT_SALMON_INDEX        = 14;
      63                 :            : const int CUBIT_CORAL_INDEX         = 15;
      64                 :            : const int CUBIT_PINK_INDEX          = 16;
      65                 :            : 
      66                 :            : #endif
      67                 :            : 

Generated by: LCOV version 1.11