Implement oneToOne() and bestFit()
This commit is contained in:
@@ -329,12 +329,14 @@ void ImageScrollAreaGL::zoomOut()
|
|||||||
|
|
||||||
void ImageScrollAreaGL::bestFit()
|
void ImageScrollAreaGL::bestFit()
|
||||||
{
|
{
|
||||||
|
m_scale = std::min((float)m_imageWidget->width()/m_imgWidth, (float)m_imageWidget->height()/m_imgHeight);
|
||||||
|
zoom(0.0f);
|
||||||
}
|
}
|
||||||
|
|
||||||
void ImageScrollAreaGL::oneToOne()
|
void ImageScrollAreaGL::oneToOne()
|
||||||
{
|
{
|
||||||
|
m_scale = 1.0f;
|
||||||
|
zoom(0.0f);
|
||||||
}
|
}
|
||||||
|
|
||||||
void ImageScrollAreaGL::scrollEvent()
|
void ImageScrollAreaGL::scrollEvent()
|
||||||
|
|||||||
Reference in New Issue
Block a user