mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#7333 Well Log Plot: Improve Stack Curve with Phase Colors
Improve curve colors when only one curve of a given phase is displayed Make sure to call the base class directly above current inheritance level Improve colors
This commit is contained in:
@@ -46,16 +46,33 @@ RiaDefines::PhaseType RimStackablePlotCurve::phaseType() const
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimStackablePlotCurve::assignStackColor( size_t index, size_t count )
|
||||
{
|
||||
auto allPhaseColors = RiaColorTables::phaseColors();
|
||||
auto it = allPhaseColors.find( phaseType() );
|
||||
if ( it != allPhaseColors.end() )
|
||||
{
|
||||
caf::ColorTable interpolatedPhaseColors = it->second.interpolated( count );
|
||||
cvf::Color3f curveColor( cvf::Color3::BROWN );
|
||||
|
||||
auto color = interpolatedPhaseColors.cycledColor3f( index );
|
||||
this->setColor( color );
|
||||
this->setFillColor( color );
|
||||
if ( count == 1 )
|
||||
{
|
||||
curveColor = RiaColorTables::phaseColor( phaseType() );
|
||||
}
|
||||
else
|
||||
{
|
||||
auto allPhaseColors = RiaColorTables::phaseColors();
|
||||
auto it = allPhaseColors.find( phaseType() );
|
||||
if ( it != allPhaseColors.end() )
|
||||
{
|
||||
caf::ColorTable interpolatedPhaseColors = it->second.interpolated( count );
|
||||
|
||||
curveColor = interpolatedPhaseColors.cycledColor3f( index );
|
||||
}
|
||||
}
|
||||
|
||||
m_fillColor = curveColor;
|
||||
|
||||
{
|
||||
auto moreSaturatedColor = RiaColorTools::toQColor( curveColor );
|
||||
moreSaturatedColor = RiaColorTools::modifySaturation( moreSaturatedColor, 1.2 );
|
||||
|
||||
m_curveColor = RiaColorTools::fromQColorTo3f( moreSaturatedColor );
|
||||
}
|
||||
|
||||
this->updateCurveAppearance();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user