mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Added Blue white red, Red whit blue legends
This commit is contained in:
parent
2413c4ac2d
commit
1dcca6a6ed
@ -61,6 +61,8 @@ namespace caf {
|
|||||||
addItem(RimLegendConfig::OPPOSITE_NORMAL,"OPPOSITE_NORMAL", "Full color, Blue on top");
|
addItem(RimLegendConfig::OPPOSITE_NORMAL,"OPPOSITE_NORMAL", "Full color, Blue on top");
|
||||||
addItem(RimLegendConfig::WHITE_PINK, "WHITE_PIMK", "White to pink");
|
addItem(RimLegendConfig::WHITE_PINK, "WHITE_PIMK", "White to pink");
|
||||||
addItem(RimLegendConfig::PINK_WHITE, "PINK_WHITE", "Pink to white");
|
addItem(RimLegendConfig::PINK_WHITE, "PINK_WHITE", "Pink to white");
|
||||||
|
addItem(RimLegendConfig::BLUE_WHITE_RED, "BLUE_WHITE_RED", "Blue, white, red");
|
||||||
|
addItem(RimLegendConfig::RED_WHITE_BLUE, "RED_WHITE_BLUE", "Red, white, blue");
|
||||||
addItem(RimLegendConfig::WHITE_BLACK, "WHITE_BLACK", "White to black");
|
addItem(RimLegendConfig::WHITE_BLACK, "WHITE_BLACK", "White to black");
|
||||||
addItem(RimLegendConfig::BLACK_WHITE, "BLACK_WHITE", "Black to white");
|
addItem(RimLegendConfig::BLACK_WHITE, "BLACK_WHITE", "Black to white");
|
||||||
setDefault(RimLegendConfig::NORMAL);
|
setDefault(RimLegendConfig::NORMAL);
|
||||||
@ -277,7 +279,8 @@ void RimLegendConfig::updateLegend()
|
|||||||
legendColors.add(cvf::Color3ub( 0, 127, 255));
|
legendColors.add(cvf::Color3ub( 0, 127, 255));
|
||||||
legendColors.add(cvf::Color3ub( 0, 0, 255));
|
legendColors.add(cvf::Color3ub( 0, 0, 255));
|
||||||
}
|
}
|
||||||
break; case BLACK_WHITE:
|
break;
|
||||||
|
case BLACK_WHITE:
|
||||||
case WHITE_BLACK:
|
case WHITE_BLACK:
|
||||||
{
|
{
|
||||||
legendColors.reserve(2);
|
legendColors.reserve(2);
|
||||||
@ -309,6 +312,25 @@ void RimLegendConfig::updateLegend()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
case BLUE_WHITE_RED:
|
||||||
|
case RED_WHITE_BLUE:
|
||||||
|
{
|
||||||
|
legendColors.reserve(3);
|
||||||
|
if (m_colorRangeMode() == BLUE_WHITE_RED)
|
||||||
|
{
|
||||||
|
legendColors.add(cvf::Color3ub::BLUE);
|
||||||
|
legendColors.add(cvf::Color3ub::WHITE);
|
||||||
|
legendColors.add(cvf::Color3ub::RED);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
legendColors.add(cvf::Color3ub::RED);
|
||||||
|
legendColors.add(cvf::Color3ub::WHITE);
|
||||||
|
legendColors.add(cvf::Color3ub::BLUE);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
m_linDiscreteScalarMapper->setColors(legendColors);
|
m_linDiscreteScalarMapper->setColors(legendColors);
|
||||||
|
@ -68,7 +68,9 @@ public:
|
|||||||
WHITE_PINK,
|
WHITE_PINK,
|
||||||
PINK_WHITE,
|
PINK_WHITE,
|
||||||
WHITE_BLACK,
|
WHITE_BLACK,
|
||||||
BLACK_WHITE
|
BLACK_WHITE,
|
||||||
|
BLUE_WHITE_RED,
|
||||||
|
RED_WHITE_BLUE
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef caf::AppEnum<ColorRangesType> ColorRangeEnum;
|
typedef caf::AppEnum<ColorRangesType> ColorRangeEnum;
|
||||||
|
Loading…
Reference in New Issue
Block a user