xPan = paramsLst[2].toDouble();
yPan = paramsLst[3].toDouble();
- vp2d->getGLWidget()->setScale( xSc, ySc, 1. );
- vp2d->getGLWidget()->setPan( xPan, yPan, 0. );
+ vp2d->setScale( xSc, ySc );
+ vp2d->setPan( xPan, yPan );
int r = paramsLst[4].toInt();
int g = paramsLst[5].toInt();
return GLViewer_ViewPort::backgroundColor();
}
+/*!
+ Sets foreground frame line width
+ \theLineWidth theColor - foreground frame line width
+*/
+void GLViewer_ViewPort2d::setScale( GLfloat xSc, GLfloat ySc )
+{
+ myXScale = xSc;
+ myYScale = ySc;
+ myGLWidget->setScale( xSc, ySc, 1.0 );
+}
+
+/*!
+ Sets foreground frame line width
+ \theLineWidth theColor - foreground frame line width
+*/
+void GLViewer_ViewPort2d::setPan( GLfloat xPan, GLfloat yPan )
+{
+ myXPan = xPan;
+ myYPan = yPan;
+ myGLWidget->setPan( xPan, yPan, 0.0 );
+}
+
/*!
Resize view
*/
//! Returns height of view
int getHeight() const { return myHeight; }
-
+ //! Sets scale factors
+ void setScale( GLfloat xSc, GLfloat ySc );
//! Returns scale factors
void getScale( GLfloat& xSc, GLfloat& ySc ) const { xSc = myXScale; ySc = myYScale; }
- //! returns offsets
+ //! Sets offsets
+ void setPan( GLfloat xPan, GLfloat yPan );
+ //! Returns offsets
void getPan( GLfloat& xPan, GLfloat& yPan ) const { xPan = myXPan; yPan = myYPan; }
//! Resize view