Skip to content

struct

Hit

pub struct Hit {
    pub x: f32,
    pub y: f32,
    pub w: f32,
    pub h: f32,
    pub name: String,
    pub label: String,
    pub value: String,
    pub tip_x: f32,
    pub tip_y: f32,
    pub highlight: Vec<Mark>,
    pub d: Option<String>,
}

The area that answers to a datum: bigger than its mark, labelled for screen readers.

Fields

x

pub x: f32

Left edge.

y

pub y: f32

Top edge.

w

pub w: f32

Width.

h

pub h: f32

Height.

name

pub name: String

Its accessible name.

label

pub label: String

The tooltip: label, value and where it points.

value

pub value: String

The tooltip's value.

tip_x

pub tip_x: f32

Where the tooltip points, across.

tip_y

pub tip_y: f32

Where the tooltip points, down.

highlight

pub highlight: Vec<Mark>

Drawn while this datum is hovered.

d

pub d: Option<String>

Its own outline, where a box wouldn't do (map regions).

Trait implementations