KetraTerm
API · DevelopmentAll versions

preferredGridSize

fun preferredGridSize(columns: Int, rows: Int, activeBuffer: TerminalRenderBufferKind = TerminalRenderBufferKind.PRIMARY): Dimension

Returns the component size in pixels for the requested grid and screen.

Must be called on the EDT because it reads the current settings and font metrics. Primary-screen chrome is the default for initial sizing.

Both dimensions must be positive. The complete size must fit the integer pixel range.

Return

a new caller-owned dimension containing pixel width and height.

Parameters

columns

requested number of terminal columns.

rows

requested number of terminal rows.

activeBuffer

screen whose chrome insets should be included.

Throws

if a dimension or the complete size is out of range.