This fix a new bug with the new EditorView's scroll-bars. As 1,2,3,4,5,6
keys change the zoom, they will change the viewport size, and scroll-bars
will be removed/added. We cannot continue iterating the View::m_children
collection after m_children is modified (scroll-bars are removed/added).
This happens because Ctrl key activates the Hand/Move quick-tool, so the
ContextBar is updated to shows controls for this tool (an empty context
bar at the moment). Then, as Ctrl+W is pressed, the document is closed,
(we lost the Editor), and we willn't receive a
ContextBar::onCurrentToolChange() event (which should be generated by
releasing Ctrl key).
With this patch we replace the "unique/odd" behavior of Aseprite where
you add selection regions with left-click and remove with right-click.
Now by default you replace the selection with left-click (as in regular
gfx programs). Also you can change the selection tool behavior with
buttons/icons at the context bar (to select between replace/add/subtract).
The affected widgets are: ColorBar::ScrollableView, ColorButton, and
StatusBar.
* Added Graphics::drawLine()
* Moved rectgrid and draw_color to modules/gfx.cpp
* Added app::RotationAlgorithm enum.
* Added app::ISelectionSettings::get/setRotationAlgorithm.
* Added app::SelectionSettingsObserver::onSetRotationAlgorithm.
* Added raster::image_rotsprite() function.
* Added ContextBar::RotAlgorithmField class to select the rotation algorithm.
* Now the mask isn't updated constantly on PixelsMovement::moveImage8),
in this way when the user release the mouse button is when we recalculate
the mask (to get better performance when the user is scaling/rotating
the image).
Fix for issue 295, there was, what amounts to an off by one error in the
original code, which was causing the problem in issue 295.
This error was probably not very noticable in larger images, but as
pointed out by the bug report smaller images may contain more distortion
than necessary.
Wasn't entirely sure how to correct the original code, so replaced it with
entirely new code.
Also added unit test for resize methods, however the bilinear test only
checks using RGB, and not the other ImageTrait types.