Expand description
The cell grid every Cellix view draws to. Backends only present a grid, so every feature works on the text-cell tier and the pixel tiers alike.
Modules§
- spinner
- The one mark that says something is under way: a faint ring with a quarter of it in full
colour, turning, where there are pictures, and turning braille on cells. Anything places it
on the grid (
Grid::spinner), in the colour of what it means. Every spinner on a grid stands at the same step, which the grid is given (Grid::turn), so one clock turns them all and a turn is a cycle of ten pictures: once a row’s ten tiles are in the terminal, turning sends nothing but placements.
Structs§
- Bitmap
- Pixels made elsewhere.
idstands for the content, so a tile hashes it and not every byte. - Bounds
- Cell
- A screen cell. An empty symbol is the right half of a wide character.
- Cell
Measure - The text-cell tier, and tests.
- Font
- How a run of painted text is set.
- Font
Measure - The pixel tiers: the same fonts and sizes the rasterizer draws with.
- Grid
- Image
- A tightly packed RGB image, matching the Kitty protocol’s
f=24. - Piece
- One cell of an icon that is
widthbyheightcells. - Rect
- Rgb
- Run
- A span of changed cells on one row.
- Software
Rasterizer - CPU rendering. Glyphs are rasterized once and blended into their cells, so text stays locked to the grid and a row costs little more than a copy.
- Strip
- One bar in a minimap, in 256ths of its box.
- Style
Enums§
Constants§
- ALL_
CORNERS - BOTTOM_
LEFT - BOTTOM_
RIGHT - EMOJI_
AIR - The air after an emoji in a line of words, as a share of the text’s size.
- FIELD_
AIR - How far a text box stands inside its row, above and below: the box is seven eighths of its row, which holds words of 13 pt raised in it with their tails off its lower edge, and leaves 4 px between two boxes in rows one under the other.
- GLYPH
- Rows tall an icon beside a name is: 16 pt where a row is 18.5 pt, VS Code’s size.
- GLYPH_
LEAD - Columns such an icon starts before where it’s asked for, which keeps its middle where an icon of 0.72 of a row had it, so it grew evenly to both sides.
- INTERFACE_
SIZE - Interface text is drawn at this size relative to the row height: 13 pt in a terminal set to 14 pt, whose row is 18.5 pt, which is the size VS Code sets its own words at.
- SMALL_
GLYPH - Rows tall an icon inside a text box or a chip is, where one of
GLYPHwould stand against the box’s edges: 13 pt. - TOP_
LEFT - TOP_
RIGHT - UNIT
- Paint positions are in 64ths of a cell, so they can sit between cells and still hash.
- WORDS_
BASELINE - How far a button’s words, a capital’s height in their middle (
Paint::Text’sspan_centred), stand over the baseline of words of 13 pt in the middle of the same row, in the terminal’s lines: their 90 per cent puts it a pixel higher, 0.9 px of a line of 36. A button in a row of words goes down this far with its words (Grid::beside_words), so they stand on the row’s baseline: “Reject” rode 3 px over the hunk’s heading beside it.
Traits§
- Measure
- Measures text, in cells, one advance per char.
- Rasterizer
- Turns one row of a grid into an image.
Functions§
- air_
under_ button - How far a button’s row reaches under its foot, in pixels, on rows
rowpx tall with words sized for a linelinepx tall: what a menu dropping from the button already has clear. - built_
in_ emoji_ holds - Whether the emoji font in the binary holds an emoji, whole: one it only has the parts of would be drawn as those, side by side. This is what a machine with no emoji font of its own can show, so it’s what’s worth offering.
- button_
in_ row - Where a button’s chip stands in its row, its top and its foot in pixels from the row’s
top, on rows
rowpx tall with words sized for a linelinepx tall. - inked
- Whether a point in the icon’s unit square is inked. Icons share a 24-unit grid and one round-ended stroke, which is what makes them read as a set.
- inset
- Where a button on a row’s wash stands, as a top and a height in pixels: at the height it
has on the terminal’s line, in the middle of where it stood.
stoodgrows a button to a control’s height on a taller row, which is the height of the wash behind a pointed row, so a button on one was exactly as tall as the wash. Kept at the line’s height, a button of 32 px on a wash of 39 has the wash 4 px over it and under it. - on_
large_ button - Whether a click at
at(columns and rows, with their fractions) lands on the large buttonGrid::large_buttonpaints at(x, y),widthcells wide. It takes the whole of what’s painted, which stands a little past its row above and below. A terminal without pixel reports gives the middle of a cell, so there it’s the button’s row. - row_
button_ in_ row - Where a button inside a row’s wash (
Grid::row_button) stands in its row where a row has room, its top and its foot in pixels from the row’s top, on rowsrowpx tall with words sized for a linelinepx tall. It’s under the row’s middle byWORDS_BASELINE, as paint moves, in whole units. - stood
- Where something
hpaint units tall atystands in rowsrowpixels tall whose words are set for a line oflinepixels, as a top and a height in pixels. Anything shorter than a row keeps the height it has on that line, in the middle of where it stood: a mark, a badge, a rule. What all but fills its row on that line is a control with a row to itself, a button, a text box, the band behind a picked row, a tip. On a taller row those are one height,CONTROLof the row, about 20 pt where a row is 26: the air goes round them and inside them both. A chip, which holds words and is a little shorter than a control, isCHIPof a taller row, so its words stand in its middle with room under their tails: on the line it’s too short for that, and its words are raised in it. - units
- Converts cells to paint units.