##// END OF EJS Templates
LogDomain zoomout fix
Marek Rosa -
r2294:08fe4e70fe7a
parent child
Show More
@@ -93,7 +93,7 void LogXLogYDomain::zoomOut(const QRectF &rect)
93 qreal maxX = qPow(m_logBaseX, newLogMaxX);
93 qreal maxX = qPow(m_logBaseX, newLogMaxX);
94
94
95 qreal ratioY = m_size.height()/rect.height();
95 qreal ratioY = m_size.height()/rect.height();
96 qreal newLogMinY = m_logMaxY - (m_logMaxY - m_logMinY) / ratioY;
96 qreal newLogMinY = m_logMinY - (m_logMaxY - m_logMinY) / ratioY;
97 qreal newLogMaxY = m_logMaxY + (m_logMaxY - m_logMinY) / ratioY;
97 qreal newLogMaxY = m_logMaxY + (m_logMaxY - m_logMinY) / ratioY;
98 qreal minY = qPow(m_logBaseY, newLogMinY);
98 qreal minY = qPow(m_logBaseY, newLogMinY);
99 qreal maxY = qPow(m_logBaseY, newLogMaxY);
99 qreal maxY = qPow(m_logBaseY, newLogMaxY);
@@ -91,7 +91,7 void XLogYDomain::zoomOut(const QRectF &rect)
91 maxX = minX + dx * m_size.width();
91 maxX = minX + dx * m_size.width();
92
92
93 qreal ratioY = m_size.height()/rect.height();
93 qreal ratioY = m_size.height()/rect.height();
94 qreal newLogMinY = m_logMaxY - (m_logMaxY - m_logMinY) / ratioY;
94 qreal newLogMinY = m_logMinY - (m_logMaxY - m_logMinY) / ratioY;
95 qreal newLogMaxY = m_logMaxY + (m_logMaxY - m_logMinY) / ratioY;
95 qreal newLogMaxY = m_logMaxY + (m_logMaxY - m_logMinY) / ratioY;
96 qreal minY = qPow(m_logBaseY, newLogMinY);
96 qreal minY = qPow(m_logBaseY, newLogMinY);
97 qreal maxY = qPow(m_logBaseY, newLogMaxY);
97 qreal maxY = qPow(m_logBaseY, newLogMaxY);
General Comments 0
You need to be logged in to leave comments. Login now