KetraTerm
API · DevelopmentAll versions

accept

abstract fun accept(image: TerminalRenderImage, column: Double, row: Double, width: Double, height: Double, sourceX: Int, sourceY: Int, sourceWidth: Int, sourceHeight: Int, clipTop: Double, clipBottom: Double, zIndex: Int)

Destination and clipping coordinates are fractional cells relative to the requested viewport; source coordinates are image pixels. Clip bounds are inclusive top/exclusive bottom. The immutable image may be retained. Placements may extend outside the viewport; intersect their destination with the viewport and vertical clip bounds without rescaling the source crop. The positive source rectangle lies within the image. Destination width and height describe the scaled crop before clipping, not the underlying raster. Negative z is below text; z below -1073741824 is also below nondefault backgrounds.

Parameters

image

immutable pixel version, which may be retained beyond the callback.

column

left destination edge in fractional viewport cells.

row

top destination edge in fractional viewport cells, possibly negative.

width

positive scaled destination width in cells, before clipping.

height

positive scaled destination height in cells, before clipping.

sourceX

nonnegative left crop edge in source pixels.

sourceY

nonnegative top crop edge in source pixels.

sourceWidth

positive crop width within image.

sourceHeight

positive crop height within image.

clipTop

inclusive vertical clip edge in fractional viewport cells.

clipBottom

exclusive vertical clip edge in fractional viewport cells.

zIndex

signed stacking layer relative to cell backgrounds and text.