diff options
author | Berthold Stoeger <bstoeger@mail.tuwien.ac.at> | 2018-07-17 20:12:29 +0200 |
---|---|---|
committer | Lubomir I. Ivanov <neolit123@gmail.com> | 2018-07-18 02:09:15 +0300 |
commit | 6d72871942adf03e13436ff9342951543351cea6 (patch) | |
tree | 495d914a7e0f90bd5e3abef731ec48c7ad014360 /core/color.h | |
parent | 2c6b1a99af103232d420a09023e9e0e6ccee9084 (diff) | |
download | subsurface-6d72871942adf03e13436ff9342951543351cea6.tar.gz |
Cleanups to core/color.[c|hpp]
A number of small cleanups to the color-table:
1) Make the profile_color map of static linkage - it is not
used outside of this file.
2) Remove the third color, which originally was planned for
printing. It was not accessed anywhere.
3) Replace QVector<QColor> by std::array<QColor, 2>. Using a
reference-counted, copy-on-write, dynamic container for static
data seems like overkill. std::array<QColor, 2> has exactly the
same run-time impact as QColor[2], but allows for assignment.
4) Use brace-initialization and remove the unneeded COLOR macro.
5) Remove the fill_profile_color function. Simply use static
initialization.
6) Move #includes from .h to .cpp file.
7) Remove text_render_options(_t), which were not used anywhere.
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Diffstat (limited to 'core/color.h')
-rw-r--r-- | core/color.h | 11 |
1 files changed, 0 insertions, 11 deletions
diff --git a/core/color.h b/core/color.h index bf2f1ddcb..246808d19 100644 --- a/core/color.h +++ b/core/color.h @@ -6,8 +6,6 @@ from http://chir.ag/projects/name-that-color */ #include <QColor> -#include <QMap> -#include <QVector> // Greens #define CAMARONE1 QColor::fromRgbF(0.0, 0.4, 0.0, 1) @@ -140,17 +138,8 @@ typedef enum { AMB_PRESSURE_LINE } color_index_t; -extern QMap<color_index_t, QVector<QColor> > profile_color; -void fill_profile_color(); QColor getColor(const color_index_t i, bool isGrayscale = false); QColor getSacColor(int sac, int diveSac); QColor getPressureColor(double density); -struct text_render_options { - double size; - color_index_t color; - double hpos, vpos; -}; - -typedef text_render_options text_render_options_t; #endif // COLOR_H |