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

@@ -58,7 +58,6 @@
}
};
/**
* See @pskl.rendering.frame.CachedFrameRenderer
* Same issue : FrameRenderer setDisplaySize destroys the canvas
@@ -78,4 +77,8 @@
});
return pskl.utils.FrameUtils.merge(frames);
};
ns.LayersRenderer.prototype.flush = function () {
this.serializedRendering = '';
};
})();