pub enum Paint {
Panel {
bounds: Bounds,
radius: u8,
fill: Option<Rgb>,
border: Option<Rgb>,
shadow: bool,
dashed: bool,
inset: bool,
},
Wash {
bounds: Bounds,
radius: u8,
color: Rgb,
alpha: u8,
border: Option<Rgb>,
},
Hairline {
bounds: Bounds,
color: Rgb,
},
Text {
x: i32,
y: i32,
max_width: i32,
text: String,
color: Rgb,
font: Font,
align_right: bool,
centred: bool,
underline: bool,
span_centred: bool,
},
Icon {
bounds: Bounds,
icon: Icon,
color: Rgb,
},
Spinner {
bounds: Bounds,
color: Rgb,
step: Option<u8>,
},
Corners {
bounds: Bounds,
radius: u8,
color: Rgb,
which: u8,
},
Strips {
bounds: Bounds,
strips: Vec<Strip>,
},
Image {
bounds: Bounds,
clip: Bounds,
bitmap: Bitmap,
color: Rgb,
},
}Variants§
Panel
Fields
inset: boolA button on a row’s wash. On a row taller than the terminal’s line it keeps the
height it has on that line and isn’t grown to a control’s, which is the wash’s
own: the wash shows over and under it. See raster::inset. A floating panel, with
a shadow, is drawn exactly over its bounds, however short of its row
(Grid::exact_popup).
Wash
A see-through wash with round corners over what’s already drawn, text included, and a border twice a panel’s weight: where something dragged would land.
Fields
Hairline
A line one device pixel thick, along the top or left of bounds.
Text
Fields
span_centred: boolIt’s a button’s words: a capital’s height in its font, its top to the baseline,
stands in the middle of the row y starts, rather than the font’s line, which stood
words of 13 pt a pixel or two high in a button. Every such run of one size stands
the same whatever its letters, so a row of buttons has one baseline, and tails hang
under it.
Icon
Spinner
Something under way: a faint ring with a quarter of it in full colour, at a step of its
turn, or with no step a still dot. Sized and placed as an icon is. See spinner.
Corners
Fills the listed corners of bounds back in. Cells can’t be rounded and paint
can’t go under text, so a rounded surface is cells with its corners painted out.
Strips
A row’s share of a minimap: many small bars, which as panels would be slow.
Image
A bitmap scaled to bounds. Coverage is inked in color.