Modified Preview Canvas

- Now the Preview can show free space around the image (the image's
corner will coincide with the center of the preview area)
- Editing objects can now be manipulated in this free space
- The editing mechanism has been split : it was completely handled in
rtengine before, now rtengine still handle the pipette's data provider,
but rtgui now handle the objects data provider.
- Bugfix: when using coarse rotate in the Editor panel, the Gradient
widgets are now correctly displayed
This commit is contained in:
Hombre
2016-01-29 22:09:56 +01:00
parent 8c3e6eab95
commit 4665b88788
22 changed files with 1413 additions and 848 deletions

View File

@@ -84,9 +84,7 @@ void ImageAreaPanel::synchronize ()
after->imageArea->getScrollPosition (x, y);
if (imgw > 0 && imgh > 0) {
int bimgw, bimgh;
imageArea->getScrollImageSize (bimgw, bimgh);
imageArea->setScrollPosition (x * bimgw / imgw, y * bimgh / imgh);
imageArea->setScrollPosition (x, y);
imageArea->queue_draw ();
}
} else if (before && this == after) {
@@ -95,9 +93,7 @@ void ImageAreaPanel::synchronize ()
before->imageArea->getScrollPosition (x, y);
if (imgw > 0 && imgh > 0) {
int bimgw, bimgh;
imageArea->getScrollImageSize (bimgw, bimgh);
imageArea->setScrollPosition (x * bimgw / imgw, y * bimgh / imgh);
imageArea->setScrollPosition (x, y);
imageArea->queue_draw ();
}
}