Working asinh stretch
This commit is contained in:
@@ -113,6 +113,7 @@ void ImageWidget::setStrech(int stretch)
|
||||
|
||||
void ImageWidget::setStretchParam(float param)
|
||||
{
|
||||
qDebug() << param;
|
||||
m_param = param;
|
||||
update();
|
||||
}
|
||||
@@ -127,11 +128,10 @@ void ImageWidget::setOffset(int dx, int dy)
|
||||
void ImageWidget::paintGL()
|
||||
{
|
||||
if(m_blockRepaint)return;
|
||||
qDebug() << "PAINT";
|
||||
qDebug() << "PAINT" << m_param;
|
||||
|
||||
float dx = m_dx;
|
||||
float dy = m_dy;
|
||||
qDebug() << "dxy" << dx << dy;
|
||||
if(width() > m_image->width()*m_scale)
|
||||
dx = -width()*0.5f + m_image->width()*m_scale*0.5f;
|
||||
if(height() > m_image->height()*m_scale)
|
||||
@@ -281,7 +281,6 @@ void ImageScrollAreaGL::updateScrollbars(bool zoom)
|
||||
void ImageScrollAreaGL::resizeEvent(QResizeEvent *event)
|
||||
{
|
||||
QWidget::resizeEvent(event);
|
||||
qDebug() << "resize" << m_imageWidget->size();
|
||||
m_verticalScrollBar->setPageStep(m_imageWidget->height());
|
||||
m_horizontalScrollBar->setPageStep(m_imageWidget->width());
|
||||
updateScrollbars();
|
||||
@@ -341,6 +340,5 @@ void ImageScrollAreaGL::oneToOne()
|
||||
|
||||
void ImageScrollAreaGL::scrollEvent()
|
||||
{
|
||||
qDebug() << m_horizontalScrollBar->value() << m_verticalScrollBar->value();
|
||||
m_imageWidget->setOffset(m_horizontalScrollBar->value(), m_verticalScrollBar->value());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user