1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
//! Provides a rectangular highlight component for visually indicating selected regions,
//! typically in text editors or similar UI elements. This module enables rendering of
//! sharp-cornered, shadowless rectangles with configurable size and color, suitable for
//! marking text selections or other highlighted areas. For multi-line or complex selections,
//! multiple highlight rectangles can be composed to cover the desired region.
use ;
use crateShapeCommand;
/// Draws a rectangular highlight, typically used to indicate selected text regions in a text editor.
///
/// This component renders a single contiguous rectangle with sharp corners and no shadow,
/// suitable for visually marking selected areas. To highlight selections spanning multiple lines
/// or with complex shapes, use multiple `selection_highlight_rect` components, each representing
/// a segment of the selection.
///
/// # Parameters
///
/// - `width`: The width of the highlight rectangle, in physical pixels (`Px`).
/// - `height`: The height of the highlight rectangle, in physical pixels (`Px`).
/// - `color`: The fill color of the rectangle, including alpha for transparency (`Color`).