Fix #242, onion skin rendered not cleared if 0 frames

This commit is contained in:
juliandescottes
2014-12-27 15:02:41 +01:00
parent 043f077408
commit 5831447f75
8 changed files with 201 additions and 79 deletions

View File

@ -3,25 +3,12 @@ describe("Canvas Renderer test", function() {
var WHITE = '#ffffff';
var TRANS = Constants.TRANSPARENT_COLOR;
var toFrameGrid = function (normalGrid) {
var frameGrid = [];
var w = normalGrid[0].length;
var h = normalGrid.length;
for (var x = 0 ; x < w ; x++) {
frameGrid[x] = [];
for (var y = 0 ; y < h ; y++) {
frameGrid[x][y] = normalGrid[y][x];
}
}
return frameGrid;
};
beforeEach(function() {});
afterEach(function() {});
it("draws transparent as white by default", function() {
// create frame
var frame = pskl.model.Frame.fromPixelGrid(toFrameGrid([
var frame = pskl.model.Frame.fromPixelGrid(test.testutils.toFrameGrid([
[BLACK, TRANS],
[TRANS, BLACK]
]));