Method GetHeightInPixels
GetHeightInPixels(int, int)
Calculates the renderable height in pixels for sixel output based on the maximum available cell height and the vertical pixel density per cell.
public int GetHeightInPixels(int maxSizeHeight, int pixelsPerCellY)
Parameters
maxSizeHeightintThe maximum available height expressed in character cells.
pixelsPerCellYintThe number of vertical pixels represented by a single character cell.
Returns
- int
The total height, in pixels, that can be safely rendered without causing the console buffer to scroll.
Remarks
Sixel graphics are encoded in vertical bands of six pixels. When AvoidBottomScroll is enabled and the available height exceeds a single sixel band, the cell height is rounded down to the nearest multiple of six to ensure that no partial sixel band is emitted at the bottom of the console. This prevents unintended upward scrolling of the console buffer.