本文整理汇总了TypeScript中terminal-kit.ScreenBufferHD类的典型用法代码示例。如果您正苦于以下问题:TypeScript ScreenBufferHD类的具体用法?TypeScript ScreenBufferHD怎么用?TypeScript ScreenBufferHD使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了ScreenBufferHD类的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。
示例1: getDetectedTerminal
term.bgColorGrayscale(192, "test");
// new color & bgColor with color name
term.color("red");
term.color("red", "test");
term.bgColor("red");
term.bgColor("red", "test");
getDetectedTerminal((error: any, term: any) => {
term.cyan("Terminal name: %s\n", term.appName);
term.cyan("Terminal app: %s\n", term.app);
term.cyan("Terminal generic: %s\n", term.generic);
term.cyan("Config file: %s\n", term.termconfigFile);
});
const screen = new ScreenBufferHD({ dst: term, noFill: true });
screen.fill({
attr: {
// Both foreground and background must have the same color
r: 40,
g: 20,
b: 0,
bgR: 40,
bgG: 20,
bgB: 0
}
});
const path_to_image = "/home/imoti/Downloads/photo_2019-01-24_13-15-50.jpg";
示例2:
(error: any, image: any) => {
if (error) {
throw error;
} // Doh!
image.draw({ dst: screen, blending: true });
screen.draw();
}