New option in application settings : onion skin.
You can choose the overlay to display now :
- no overlay
- onion skin (default)
- layer preview (previous default)
Available in Application Settings panel.
Only one overlay can be used at the same time.
The onion skin overlay is driven by a new OnionSkinRenderer maanged by the
drawing.
The drawing controller is responsible for instanciating and 'choosing' the
overlay renderer.
When switching to a new overlay, other overlays are cleared and flushed
(they cache their rendering frame, flush empties the cache).
NB : flush is only available on LayersRenderer and OnionSkinRenderer for
now.
- new checkbox in resize panel
- content is resized using nearest neighbor
- deactivated by default
2 bug fixes :
- remove focus after closing drawer
- fire resize event after undo/redo if size changed
- new controller CursorCoordinatesController
- added div in right column (bottom:0)
- 3 new events : CURSOR_MOVED, DRAG_START, DRAG_END
- modified tools to fire events when necessary
The cursor coordinates are displayed when the mouse is hovering the
drawing area. When the mouse leaves the area, the indication disappears.
If the user is using a tool that involves dragging (selection, rectangle,
circle), the indicator displays the original coordinates (captured during
drag start) and the current coordinates.
- mutualized shape tools common code in a ShapeTool class
- when holding shift and drawing a frame, the ratio is preserved
- selection and shape tools now support the mouse to leave the drawing
area
- shape tools can go 'outside' the drawing canvas
- Frame set/getPixel now check the pixel is in range instead of crashing
Issue was coming from the cached frame renderer.
During the window resize, we update the displaySize of the frame renderer,
regardless of the fact that the dimensions changed or not.
The setDisplaySize triggers a destruction of the canvas. But the
CachedFrameRenderer will render the frame only if it detects a change. In
this case, setDisplaySize has been overrided in CachedFrameRenderer to
skip any processing if the dimensions didn't change.
This behavior could be actually done in the FrameRenderer itself, but
since this is crucial to the CachedFrameRenderer behavior, I prefer to
keep it in this class.
Alternatively, could implement a way to discard caches of
CachedFrameRenderers from the outside.