mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
#8822 Summary Axis: Add tick mark count to y-axis
This commit is contained in:
@@ -18,6 +18,9 @@
|
||||
|
||||
#include "RiaPlotDefines.h"
|
||||
|
||||
#include "RiaGuiApplication.h"
|
||||
#include "RiaPreferencesSystem.h"
|
||||
|
||||
#include "cafAppEnum.h"
|
||||
|
||||
namespace caf
|
||||
@@ -73,3 +76,20 @@ bool RiaDefines::isVertical( RiaDefines::PlotAxis axis )
|
||||
{
|
||||
return ( axis == RiaDefines::PlotAxis::PLOT_AXIS_LEFT || axis == RiaDefines::PlotAxis::PLOT_AXIS_RIGHT );
|
||||
}
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
double RiaDefines::scalingFactor( QPaintDevice* paintDevice )
|
||||
{
|
||||
auto scalingFactor = RiaPreferencesSystem::current()->exportPdfScalingFactor();
|
||||
|
||||
if ( scalingFactor > 0.0 ) return scalingFactor;
|
||||
|
||||
if ( !paintDevice ) return 1.0;
|
||||
|
||||
int resolution = paintDevice->logicalDpiX();
|
||||
double scaling = resolution / static_cast<double>( RiaGuiApplication::applicationResolution() );
|
||||
|
||||
return scaling;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user