Table of Contents

Method EncodePut

Namespace
Terminal.Gui.Drawing
Assembly
Terminal.Gui.dll

EncodePut(int, int, int, int, int, int, int, int)

Encodes a placement (a=p) that displays a crop of an already-transmitted image (see EncodeTransmit(Color[,], int)) at the current cursor position. The source rectangle (srcX,srcY,srcW,srcH) in image pixels is scaled to fill destCols×destRows cells. A later placement with the same (image id, placement id) replaces this one in place — so panning/zooming a static image is a tiny, flash-free update rather than a full re-transmit.

public static string EncodePut(int imageId, int placementId, int srcX, int srcY, int srcW, int srcH, int destCols, int destRows)

Parameters

imageId int

The id of the already-transmitted image.

placementId int

The placement id; reusing it replaces the placement in place.

srcX int

Left edge of the source crop, in image pixels.

srcY int

Top edge of the source crop, in image pixels.

srcW int

Width of the source crop, in image pixels.

srcH int

Height of the source crop, in image pixels.

destCols int

Number of columns to display the crop in.

destRows int

Number of rows to display the crop in.

Returns

string

The complete Kitty APC placement escape sequence.