From 82695e331bb0182d37261fb0f40b36218cc676ce Mon Sep 17 00:00:00 2001 From: Marek Blok <Marek.Blok@pg.edu.pl> Date: Thu, 23 Mar 2023 08:57:25 +0100 Subject: [PATCH] Added DOT_edge_colors switched red with blue for edges --- CHANGELOG | 3 +++ src/cpp/DSP_DOT.cpp | 12 +++++++++--- src/include/DSP_DOT.h | 1 + src/include/DSP_lib.h | 2 +- src/include/DSP_modules.h | 1 + 5 files changed, 15 insertions(+), 4 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index ecfda11..49eb12f 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -8,6 +8,9 @@ TODO:: LAST DONE: CHANGES: +- ver. 0.20.016 - <b>2022.03.23</b> Changed: + - DSP::DOT_edge_colors: added separate colors table for edges which starts from blue color and then red. + In most multiedge blocks first edge is for real part (blue) and second for imaginary part (red). - ver. 0.20.015 - <b>2022.03.18</b> Changed: - DSP::u::InputBuffer: added reset_buffer to WriteBuffer so buffer output will start from newly added data - ver. 0.20.014 - <b>2023.03.014/b> Changed: diff --git a/src/cpp/DSP_DOT.cpp b/src/cpp/DSP_DOT.cpp index 5e7e479..5c29b67 100644 --- a/src/cpp/DSP_DOT.cpp +++ b/src/cpp/DSP_DOT.cpp @@ -19,6 +19,12 @@ const vector<string> DSP::DOT_colors = "chocolate4", "blueviolet", "deeppink1", "goldenrod1" }; +const vector<string> DSP::DOT_edge_colors = +{ + "royalblue2", "red", "green3", "turquoise2", "yellow3", + "chocolate4", "blueviolet", "deeppink1", "goldenrod1" +}; + #ifdef __DEBUG__ string DSP::u::Splitter::GetComponentNodeParams_DOTfile(void) { @@ -56,7 +62,7 @@ const vector<string> DSP::DOT_colors = //ind2 = FindOutputIndex_by_InputIndex(ind2); if (ind2 <= DSP::MaxOutputIndex) - text_buffer << "[color=" << DOT_colors[ind2 % DOT_colors.size()] << "]"; + text_buffer << "[color=" << DOT_edge_colors[ind2 % DOT_edge_colors.size()] << "]"; else text_buffer << "[color=black]"; return text_buffer.str(); @@ -374,7 +380,7 @@ string DSP::Component::GetComponentNodeParams_DOTfile(const string &leading_spac string DSP::Component::GetComponentEdgeParams_DOTfile(const unsigned int &output_index) { stringstream text_buffer; - text_buffer << "[color=" << DOT_colors[output_index % DOT_colors.size()] << "]"; + text_buffer << "[color=" << DOT_edge_colors[output_index % DOT_edge_colors.size()] << "]"; return text_buffer.str(); } @@ -759,7 +765,7 @@ void DSP::Component::ComponentToDOTfile(std::ofstream &dot_plik, string DSP::Macro::GetMacroEdgeParams_DOTfile(const unsigned int &output_index) { stringstream text_buffer; - text_buffer << "[color=" << DOT_colors[output_index % DOT_colors.size()] << "]"; + text_buffer << "[color=" << DOT_edge_colors[output_index % DOT_edge_colors.size()] << "]"; return text_buffer.str(); } diff --git a/src/include/DSP_DOT.h b/src/include/DSP_DOT.h index 9a3aa1c..7299351 100644 --- a/src/include/DSP_DOT.h +++ b/src/include/DSP_DOT.h @@ -15,6 +15,7 @@ namespace DSP { //! DOT colors table extern const std::vector<std::string> DOT_colors; + extern const std::vector<std::string> DOT_edge_colors; //! DSPElib sub-namespace for enums definitions namespace e { diff --git a/src/include/DSP_lib.h b/src/include/DSP_lib.h index 3f841eb..080d14a 100644 --- a/src/include/DSP_lib.h +++ b/src/include/DSP_lib.h @@ -11,7 +11,7 @@ #define DSP_VER_MAJOR 0 #define DSP_VER_MINOR 20 -#define DSP_VER_BUILD 15 // !!! without zeroes before, else this will be treated as octal number +#define DSP_VER_BUILD 16 // !!! without zeroes before, else this will be treated as octal number #define DSP_VER_YEAR 2023 #define DSP_VER DSP_VER_MAJOR.DSP_VER_MINOR.DSP_VER_BUILD diff --git a/src/include/DSP_modules.h b/src/include/DSP_modules.h index 2e0dd13..305ee04 100644 --- a/src/include/DSP_modules.h +++ b/src/include/DSP_modules.h @@ -727,6 +727,7 @@ class DSP::name #ifdef __DEBUG__ namespace DSP { extern const vector<string> DOT_colors; + extern const vector<string> DOT_edge_colors; } #endif -- GitLab