2014-04-07 13:18:39 +02:00
|
|
|
/////////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
//
|
2014-09-24 07:14:52 +02:00
|
|
|
// Copyright (C) Statoil ASA
|
|
|
|
|
// Copyright (C) Ceetron Solutions AS
|
2019-09-06 10:40:57 +02:00
|
|
|
//
|
2014-04-07 13:18:39 +02:00
|
|
|
// ResInsight is free software: you can redistribute it and/or modify
|
|
|
|
|
// it under the terms of the GNU General Public License as published by
|
|
|
|
|
// the Free Software Foundation, either version 3 of the License, or
|
|
|
|
|
// (at your option) any later version.
|
2019-09-06 10:40:57 +02:00
|
|
|
//
|
2014-04-07 13:18:39 +02:00
|
|
|
// ResInsight is distributed in the hope that it will be useful, but WITHOUT ANY
|
|
|
|
|
// WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
|
|
|
// FITNESS FOR A PARTICULAR PURPOSE.
|
2019-09-06 10:40:57 +02:00
|
|
|
//
|
|
|
|
|
// See the GNU General Public License at <http://www.gnu.org/licenses/gpl.html>
|
2014-04-07 13:18:39 +02:00
|
|
|
// for more details.
|
|
|
|
|
//
|
|
|
|
|
/////////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
2018-04-05 15:25:33 +02:00
|
|
|
#include "cafTitledOverlayFrame.h"
|
2014-04-07 13:18:39 +02:00
|
|
|
#include "cvfColor3.h"
|
2018-03-08 16:14:13 +01:00
|
|
|
#include "cvfColor4.h"
|
2019-09-06 10:40:57 +02:00
|
|
|
#include "cvfMatrix4.h"
|
2014-04-07 13:18:39 +02:00
|
|
|
#include "cvfString.h"
|
|
|
|
|
|
2019-09-06 10:40:57 +02:00
|
|
|
namespace cvf
|
|
|
|
|
{
|
2014-04-07 13:18:39 +02:00
|
|
|
class Font;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//==================================================================================================
|
|
|
|
|
//
|
2019-09-06 10:40:57 +02:00
|
|
|
//
|
2014-04-07 13:18:39 +02:00
|
|
|
//
|
|
|
|
|
//==================================================================================================
|
2018-04-05 15:25:33 +02:00
|
|
|
class RivTernarySaturationOverlayItem : public caf::TitledOverlayFrame
|
2014-04-07 13:18:39 +02:00
|
|
|
{
|
|
|
|
|
public:
|
2019-09-06 10:40:57 +02:00
|
|
|
explicit RivTernarySaturationOverlayItem( cvf::Font* font );
|
2018-10-18 19:45:57 +02:00
|
|
|
~RivTernarySaturationOverlayItem() override;
|
2014-04-07 13:18:39 +02:00
|
|
|
|
2019-09-06 10:40:57 +02:00
|
|
|
void setRangeText( const cvf::String& soilRange, const cvf::String& sgasRange, const cvf::String& swatRange );
|
2014-05-06 23:29:41 +02:00
|
|
|
|
2019-09-06 10:40:57 +02:00
|
|
|
void setAxisLabelsColor( const cvf::Color3f& color );
|
|
|
|
|
cvf::Vec2ui preferredSize() override;
|
2014-04-07 13:18:39 +02:00
|
|
|
|
|
|
|
|
private:
|
2019-09-06 10:40:57 +02:00
|
|
|
void render( cvf::OpenGLContext* oglContext, const cvf::Vec2i& position, const cvf::Vec2ui& size ) override;
|
|
|
|
|
void renderSoftware( cvf::OpenGLContext* oglContext, const cvf::Vec2i& position, const cvf::Vec2ui& size ) override;
|
2018-03-08 16:14:13 +01:00
|
|
|
|
2019-09-06 10:40:57 +02:00
|
|
|
void renderGeneric( cvf::OpenGLContext* oglContext, const cvf::Vec2i& position, const cvf::Vec2ui& size, bool software );
|
2019-11-04 14:35:41 +01:00
|
|
|
void renderAxisImmediateMode( float upperY,
|
|
|
|
|
float lowerBoundY,
|
|
|
|
|
float border,
|
|
|
|
|
unsigned int totalWidth,
|
|
|
|
|
cvf::OpenGLContext* oglContext );
|
2014-04-07 13:18:39 +02:00
|
|
|
|
|
|
|
|
private:
|
2019-09-06 10:40:57 +02:00
|
|
|
cvf::String m_soilRange;
|
|
|
|
|
cvf::String m_sgasRange;
|
|
|
|
|
cvf::String m_swatRange;
|
2014-04-07 13:18:39 +02:00
|
|
|
};
|