Added Zooming to Mouse-Position#74
Conversation
src/image_canvas.cpp
Outdated
|
|
||
| if(_scroll_parent->verticalScrollBar()) | ||
| { | ||
| float_t posHeightRel = float_t (mPos.y()/imSize.height()); //Relation Mauspos zu Höhe des Images |
There was a problem hiding this comment.
use auto instead of float_t
There was a problem hiding this comment.
This is what causes AppVeyor to crash.
As this is a cast to auto, which is forbidden by the visual-studio-compiler:
https://docs.microsoft.com/en-us/cpp/error-messages/compiler-errors-2/compiler-error-c3537?view=msvc-160
So I'm changing it back to float_t.
src/image_canvas.cpp
Outdated
|
|
||
| if(_scroll_parent->horizontalScrollBar()) | ||
| { | ||
| float_t posWidthRel = float_t (mPos.x()/imSize.width()); //Relation Mauspos zu Breite des Images |
There was a problem hiding this comment.
use auto instead of float_t
daandres
left a comment
There was a problem hiding this comment.
great work!
i get flickering when resizing images, but it works.
see inline comments for requested changes.
|
Ok, so shall I do another commit and do another pull-request or what would be the appropriate next steps for me to finish the pull-request? |
|
I'm not code owner. |
|
I will take a closer look as soon as I have time. there are already some updates going on on the dev branch that i need to merge, that said your code does not compile under windows in current state (https://ci.appveyor.com/project/abreheret/pixelannotationtool/builds/38772849#L96). |
|
I don't have a windows environment. |
|
Hi @abreheret, |
Changed the auto -> float_t again as it caused crash on visual-studio-compiler: C3537 (cast to auto is forbidden)
|
Ou dammit :-/. What's the matter 😆 now?! |
changed to a static_cast
Correcting syntax with auto-keyword
…Also when changin ImageTabs the View of SlicParams for this special Image in the Window gets updated!
|
Hi guys, any news regarding merging this feature to master? |
Hi @abreheret,
for my purpuses I added a zooming function to your project.
I used it to annotate large pictures, where a fine pixel-labelling is demanded.
Hope it can serve someone else in the future.
Main Changes:
image_canvas.h (added lines: 75-78):
image_canvas.cpp(added lines: 104 - 141 & 187-191):
Questions welcome!