iniquity

A re-imagining of the iconic BBS software.

View on GitHub

Module: core/graphic

Graphic Class - In-Memory ANSI Buffer

Summary

Cell-based ANSI manipulation for storing and rendering graphics

Inspired by Synchronet’s graphic.js library, this class provides:

Table of contents

References

Classes

Interfaces

Functions

References

CGA

Re-exports CGA

Functions

getBackground

getBackground(attr): number

Helper function to extract background from attribute

Parameters

Name Type
attr number

Returns

number

Defined in

core/src/graphic.ts:884


getForeground

getForeground(attr): number

Helper function to extract foreground from attribute

Parameters

Name Type
attr number

Returns

number

Defined in

core/src/graphic.ts:877


hasBlink(attr): boolean

Helper function to check if blink is set

Parameters

Name Type
attr number

Returns

boolean

Defined in

core/src/graphic.ts:891


makeAttr

makeAttr(fg, bg?, blink?): number

Helper function to create attribute from components

Parameters

Name Type Default value
fg number undefined
bg number 0
blink boolean false

Returns

number

Defined in

core/src/graphic.ts:868