StripText

Text drawn over a heat strip: its own color over a 1-pixel shadow (monitor-load-color §MHD-4).

Declared in src/libs/libwidgets/components/visualization/StripText.hpp.

Detailed description

The strip under the text changes color from column to column, from clear to white, so no one text color reads on all of it. The shadow, black at alpha 160 and offset by (1, 1), separates the glyphs from the strip at both ends. The second draw finds its glyphs in the raster engine's glyph cache, so it costs one drawText more and no rasterization.

setShadowForTest() is for tests only: the benchmark of §MHT-4 times a paint without the shadow against the paint with it. The switch is global and it reaches every list of the process, so no production code calls it, and a test that switches the shadow off switches it on again.

See also RowLifecycle, LoadColor.

In this section