summaryrefslogtreecommitdiff
path: root/js/blit.js
diff options
context:
space:
mode:
authorJules Laplace <jules@okfoc.us>2016-05-11 15:28:45 -0400
committerJules Laplace <jules@okfoc.us>2016-05-11 15:28:45 -0400
commit5e6b378965fc8e969309059aa4ea7e5d239ab3b5 (patch)
tree9022fd42a37896064fe9778f9534792dcca1e3d1 /js/blit.js
parent3c5556c0610c4b28e78e012cd21812ff2b484fd8 (diff)
add inverted cross brush, smear brush, pick brush style..
Diffstat (limited to 'js/blit.js')
-rw-r--r--js/blit.js11
1 files changed, 11 insertions, 0 deletions
diff --git a/js/blit.js b/js/blit.js
index 2e41f5c..b434742 100644
--- a/js/blit.js
+++ b/js/blit.js
@@ -78,6 +78,17 @@ var blit = (function(){
}
})
}
+ blit.inverted_cross = function(A, lex){
+ // 1x1 brush should still draw something
+ if (A.w == 1 && A.h == 1) {
+ return
+ }
+ A.forEach(function(lex,x,y) {
+ if (!((x+y)%2)) {
+ lex.clear()
+ }
+ })
+ }
blit.square = function(A, lex){
// i.e. no transparency
}