From 5e6b378965fc8e969309059aa4ea7e5d239ab3b5 Mon Sep 17 00:00:00 2001 From: Jules Laplace Date: Wed, 11 May 2016 15:28:45 -0400 Subject: add inverted cross brush, smear brush, pick brush style.. --- js/blit.js | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'js/blit.js') 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 } -- cgit v1.2.3-70-g09d2