Skip to main content

Module overdraw

Module overdraw 

Source
Expand description

Text drawn again over the layers painted under it — a selection, a highlight, a find match — where its own colour does not read on them.

gpui shapes each colour of a line apart, so a piece is recoloured by drawing its glyphs again over the line rather than by cutting its runs.

Structs§

Layers
What is painted under a text, in its offsets: washes (a highlight, a find match, a comment) and a selection, each in the shape S its painter draws it in. A painter draws Layers::painted and overdraws reads the same order.
Overdraw
A piece of text that the layers under it leave below its contrast.

Functions§

overdraws
The pieces of runs to draw again over layers on the opaque page: each on its Layers::plate, its ink theme::ink_over that plate from its Layers::surface. Text that reads there already, and text under nothing, is left out.
paint
Draws pieces again over what is already painted: each row of a piece covered in its plate, corners rounded by radius, then its glyphs in its ink. lines are a text’s lines laid out one under the other from origin, and pieces are in the text’s offsets.