diff options
| author | Julie Lala <jules@okfoc.us> | 2013-12-19 20:22:04 -0500 |
|---|---|---|
| committer | Julie Lala <jules@okfoc.us> | 2013-12-19 20:22:04 -0500 |
| commit | 5074835b9e4a532f5a42394c2d4a244b0fab2a01 (patch) | |
| tree | fbaa48a8a436e907d447cad73465a8eb4ad4476d /js/record.concat.js | |
| parent | 35bab6de471ed2cb971b736e97a83d60eab0628e (diff) | |
background color
Diffstat (limited to 'js/record.concat.js')
| -rw-r--r-- | js/record.concat.js | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/js/record.concat.js b/js/record.concat.js index b714799..12af95d 100644 --- a/js/record.concat.js +++ b/js/record.concat.js @@ -1056,10 +1056,20 @@ function GifEncoder(){ frames[i].width = w } } + function backgroundColor(){ + var colors = [ + source.style.backgroundColor, + document.body.backgroundColor, + "white" + ] + for (var i in colors) { + if (colors[i] != "") return colors[i] + } + } function capture(){ var frame = frames[done++] var ctx = frame.getContext('2d') - ctx.fillStyle = document.body.backgroundColor + ctx.fillStyle = backgroundColor() ctx.fillRect(0,0,w,h) ctx.drawImage(source, x, y, w, h, 0, 0, w, h) } |
