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:
Magne Sjaastad committed 2015-11-23 09:56:48 +01:00
1 parent dc1a66d2cc
commit 9a25a71cde
1 file changed
+3 -2
+3 -2
View File
@@ -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;