malwoden
Version:
   
38 lines • 1.53 kB
JavaScript
;
var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
return extendStatics(d, b);
};
return function (d, b) {
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
Object.defineProperty(exports, "__esModule", { value: true });
exports.MemoryTerminal = void 0;
var _1 = require(".");
var struct_1 = require("../struct");
var MemoryTerminal = /** @class */ (function (_super) {
__extends(MemoryTerminal, _super);
function MemoryTerminal(config) {
var _this = _super.call(this, config) || this;
_this.glyphs = new struct_1.Table(config.width, config.height);
return _this;
}
MemoryTerminal.prototype.windowToTilePoint = function (pixel) {
return pixel;
};
MemoryTerminal.prototype.delete = function () { };
MemoryTerminal.prototype.drawGlyph = function (pos, glyph) {
if (this.glyphs.isInBounds(pos) === false)
return;
this.glyphs.set(pos, glyph);
};
return MemoryTerminal;
}(_1.BaseTerminal));
exports.MemoryTerminal = MemoryTerminal;
//# sourceMappingURL=memory-terminal.js.map