diff options
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) } |
