mirror of
https://github.com/OPM/ResInsight.git
synced 2026-10-14 17:32:13 -05:00
Fwk : Added support for more characters in axis labels
Moved drawing of axis cross slightly closer to left edge of available viewport
This commit is contained in:
1 parent
dc1a66d2cc
commit
9a25a71cde
1 file changed
+3
-2
@@ -102,7 +102,8 @@ void OverlayAxisCross::setAxisLabels( const String& xLabel, const String& yLabel
|
||||
{
|
||||
// Clipping of axis label text is depends on m_size and
|
||||
// z-part of axisMatrix.setTranslation(Vec3d(0, 0, -4.4)) defined in OverlayAxisCross::render()
|
||||
CVF_ASSERT (xLabel.size() < 5 && yLabel.size() < 5 && zLabel.size() < 5);
|
||||
|
||||
CVF_ASSERT (xLabel.size() < 7 && yLabel.size() < 7 && zLabel.size() < 7);
|
||||
|
||||
m_xLabel = xLabel;
|
||||
m_yLabel = yLabel;
|
||||
@@ -174,7 +175,7 @@ void OverlayAxisCross::render(OpenGLContext* oglContext, const Vec2i& position,
|
||||
|
||||
// Position the camera far enough away to make the axis and the text fit within the viewport
|
||||
Mat4d axisMatrix = viewMatrix;
|
||||
axisMatrix.setTranslation(Vec3d(0, 0, -4.4));
|
||||
axisMatrix.setTranslation(Vec3d(-0.4, 0, -4.4));
|
||||
|
||||
// Setup camera
|
||||
Camera cam;
|
||||
|
||||
Reference in new issue
Block a user