Add ability to set param of stretch
This commit is contained in:
@@ -111,6 +111,12 @@ void ImageWidget::setStrech(int stretch)
|
||||
update();
|
||||
}
|
||||
|
||||
void ImageWidget::setStretchParam(float param)
|
||||
{
|
||||
m_param = param;
|
||||
update();
|
||||
}
|
||||
|
||||
void ImageWidget::setOffset(int dx, int dy)
|
||||
{
|
||||
m_dx = dx;
|
||||
@@ -137,7 +143,7 @@ void ImageWidget::paintGL()
|
||||
m_program->setUniformValue("viewport", (float)width(), (float)height());
|
||||
m_program->setUniformValue("offset", dx, dy);
|
||||
m_program->setUniformValue("stretch", m_stretch);
|
||||
m_program->setUniformValue("a", 0.1f);
|
||||
m_program->setUniformValue("a", m_param);
|
||||
m_program->setUniformValue("zoom", 1.0f/m_scale);
|
||||
|
||||
m_image->bind(0);
|
||||
|
||||
Reference in New Issue
Block a user