Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface ANSIImageOptions

Hierarchy

Index

Properties

Optional _data

_data: object

Miscelanus options. Currently JavaScript/Blessed allows to pass anything as option, this is just a bucket for TypeScript and have impact

Type declaration

  • [name: string]: any

Optional align

align: "left" | "center" | "right"

Text alignment: left, center, or right.

Optional alwaysScroll

alwaysScroll: boolean

A option which causes the ignoring of childOffset. This in turn causes the childBase to change every time the element is scrolled.

animate

animate: boolean

Whether to animate if the image is an APNG/animating GIF. If false, only display the first frame or IDAT (Default: true).

ascii

ascii: string

Add various "density" ASCII characters over the rendering to give the image more detail, similar to libcaca/libcucul (the library mplayer uses to display videos in the terminal).

Optional baseLimit

baseLimit: number

A limit to the childBase. Default is Infinity.

Optional bg

bg: Color

Optional bindings

bindings: any

Optional blink

blink: boolean

Optional bold

bold: boolean

Optional border

Border object, see below.

Optional bottom

bottom: TPosition

Optional ch

ch: string

Background character (default is whitespace ).

Optional children

children: Node[]

Optional clickable

clickable: boolean

Element is clickable.

Optional content

content: string

Element's text content.

Optional dockBorders

dockBorders: boolean

Automatically "dock" borders with other elements instead of overlapping, depending on position (experimental).

Optional draggable

draggable: boolean

Allow the element to be dragged with the mouse.

Optional effects

effects: object

Same as style.focus and style.hover

Type declaration

Optional fg

fg: Color

file

file: string

URL or path to PNG/GIF file. Can also be a buffer.

Optional fixed

fixed: boolean

Optional focusEffects

focusEffects: TStyle

Same as style.focus

Optional focusable

focusable: boolean

If true, the node will obtain focus when m

Optional focused

focused: boolean

Element is focused.

height

height: number | string

Optional hidden

hidden: boolean

Whether the element is hidden.

Optional hoverBg

hoverBg: Color

Same as style.hover.bg

Optional hoverEffects

hoverEffects: TStyle

Same as style.hover

Optional hoverText

hoverText: string

A floating text label for the element which appears on mouseover.

Optional input

input: boolean

Element is focusable and can receive key input.

Optional inverse

inverse: boolean

Optional invisible

invisible: boolean

Optional keyable

keyable: boolean

Keys enabled for this element.

Optional keys

keys: string | string[] | boolean

Use pre-defined keys (i or enter for insert, e for editor, C-e for editor while inserting).

Optional label

label: string

A simple text label for the element.

Optional left

left: TTopLeft

Optional mouse

mouse: boolean

Whether to enable automatic mouse support for this element. Use pre-defined mouse events (right-click for editor).

Optional name

name: string

Optional noOverflow

noOverflow: boolean

Hide content or children outside this element's viewport.

optimization

optimization: "mem" | "cpu"

mem or cpu. If optimizing for memory, animation frames will be rendered to bitmaps as the animation plays, using less memory. Optimizing for cpu will precompile all bitmaps beforehand, which may be faster, but might also OOM the process on large images. (Default: mem).

Optional padding

padding: number | Padding

Amount of padding on the inside of the element. Can be a number or an object containing the properties: left, right, top, and bottom.

Optional parent

parent: Node

Optional position

position: Position

Can contain the above options.

Optional ref

accursed library custom support for React-like Refs. Declare the option here so it works out of the box. https://reactjs.org/docs/refs-and-the-dom.html. TODO: documentation

Optional right

right: TPosition

scale

scale: number

Scale cellmap down (0-1.0) from its original pixel width/height (Default: 1.0).

Optional screen

screen: Screen

Optional scrollable

scrollable: boolean

Whether the element is scrollable or not.

Optional scrollbar

scrollbar: object & TStyle | boolean

Object enabling a scrollbar. Style of the scrollbar track if present (takes regular style options).

Optional shadow

shadow: boolean

Draw a translucent offset shadow behind the element.

Optional shrink

shrink: boolean

Shrink/flex/grow to content and child elements. Width/height during render.

speed

speed: number

Set the speed of animation. Slower: 0.0-1.0. Faster: 1-1000. It cannot go faster than 1 frame per millisecond, so 1000 is the fastest. (Default: 1.0)

Optional style

style: TStyle

Optional tags

tags: boolean

Optional top

Optional transparent

transparent: boolean

Optional underline

underline: boolean

Optional valign

valign: "top" | "middle" | "bottom"

Vertical text alignment: top, middle, or bottom.

Optional vi

vi: boolean

Use vi keys with the keys option.

width

width: number | string

This differs from other element's width or height in that only one of them is needed: blessed will maintain the aspect ratio of the image as it scales down to the proper number of cells. NOTE: PNG/GIF's are always automatically shrunken to size (based on scale) if a width or height is not given.

Optional wrap

wrap: boolean

Wrap content inside this element viewport.

Generated using TypeDoc