Terminal image sampler for quarter- and half-pixel block glyphs.
More...
#include "donner/svg/renderer/TerminalImageViewer.h"
Terminal image sampler for quarter- and half-pixel block glyphs.
◆ calculateITermImageRows()
| int donner::svg::TerminalImageViewer::calculateITermImageRows |
( |
int | imageWidth, |
|
|
int | imageHeight, |
|
|
int | widthPercent, |
|
|
const TerminalSize & | terminalSize, |
|
|
const TerminalCellSize & | cellSize ) const |
Calculate how many terminal rows an iTerm inline image will occupy.
- Parameters
-
| imageWidth | Width of the image in pixels |
| imageHeight | Height of the image in pixels |
| widthPercent | Width percentage parameter passed to iTerm (e.g., 30 for "30%") |
| terminalSize | Terminal size in columns and rows |
| cellSize | Terminal cell size in pixels |
- Returns
- Number of terminal rows the image will occupy
◆ DetectTerminalCellSize()
Detect terminal cell size using ioctl (TIOCGWINSZ).
- Returns
- Terminal cell size in pixels, with defaults if detection fails.
◆ DetectTerminalSize()
| TerminalSize donner::svg::TerminalImageViewer::DetectTerminalSize |
( |
| ) |
|
|
static |
Detect terminal size using ioctl (TIOCGWINSZ).
- Returns
- Terminal size in columns and rows, with defaults if detection fails.
The documentation for this class was generated from the following files: