mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Fix legends for ensemble plots
This commit is contained in:
@@ -160,12 +160,10 @@ int RiuScalarMapperLegendFrame::rectCount() const
|
||||
void RiuScalarMapperLegendFrame::renderRect( QPainter* painter, const LayoutInfo& layout, int rectIndex ) const
|
||||
{
|
||||
int rectIndexFromBottom = rectCount() - rectIndex - 1;
|
||||
cvf::Color3ub startColor = m_scalarMapper->mapToColor(
|
||||
m_scalarMapper->domainValue( m_tickValues[rectIndexFromBottom] ) );
|
||||
cvf::Color3ub endColor = m_scalarMapper->mapToColor(
|
||||
m_scalarMapper->domainValue( m_tickValues[rectIndexFromBottom + 1] ) );
|
||||
QColor startQColor( startColor.r(), startColor.g(), startColor.b() );
|
||||
QColor endQColor( endColor.r(), endColor.g(), endColor.b() );
|
||||
cvf::Color3ub startColor = m_scalarMapper->mapToColor( m_tickValues[rectIndexFromBottom] );
|
||||
cvf::Color3ub endColor = m_scalarMapper->mapToColor( m_tickValues[rectIndexFromBottom + 1] );
|
||||
QColor startQColor( startColor.r(), startColor.g(), startColor.b() );
|
||||
QColor endQColor( endColor.r(), endColor.g(), endColor.b() );
|
||||
|
||||
QRectF gradientRect( QPointF( layout.tickStartX,
|
||||
layout.colorBarRect.bottom() - layout.tickYPixelPos[rectIndexFromBottom] + 1 ),
|
||||
|
||||
Reference in New Issue
Block a user