Feature : add onion skin option

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.
This commit is contained in:
jdescottes
2014-06-19 23:33:57 +02:00
parent fbb5ccc7e2
commit 98f59fecf1
9 changed files with 129 additions and 13 deletions

View File

@@ -6,12 +6,14 @@
CANVAS_BACKGROUND : 'CANVAS_BACKGROUND',
SELECTED_PALETTE : 'SELECTED_PALETTE',
TILED_PREVIEW : 'TILED_PREVIEW',
OVERLAY : 'OVERLAY',
KEY_TO_DEFAULT_VALUE_MAP_ : {
'GRID_WIDTH' : 0,
'CANVAS_BACKGROUND' : 'lowcont-dark-canvas-background',
'SELECTED_PALETTE' : Constants.CURRENT_COLORS_PALETTE_ID,
'TILED_PREVIEW' : false
'TILED_PREVIEW' : false,
'OVERLAY' : Constants.OVERLAY_ONION_SKIN
},
/**