diff options
Diffstat (limited to 'js/lex.js')
| -rw-r--r-- | js/lex.js | 10 |
1 files changed, 9 insertions, 1 deletions
@@ -57,6 +57,11 @@ Lex.prototype.clone = function (lex){ this.opacity = lex.opacity this.build() } +Lex.prototype.copy = function () { + var lex = new Lex (0,0) + lex.clone(this) + return lex +} Lex.prototype.erase = function (){ this.fg = colors.white this.bg = colors.black @@ -71,7 +76,10 @@ Lex.prototype.fill = function(fg, bg){ this.build() } Lex.prototype.eq = function(lex){ - return lex && this.fg == lex.fg && this.bg == lex.fg && this.char == lex.char + return lex && this.fg == lex.fg && this.bg == lex.bg && this.char == lex.char +} +Lex.prototype.ne = function(lex){ + return ! this.eq(lex) } Lex.prototype.clear = function(){ this.bg = 1 |
