pub struct Resolution {
pub index: usize,
pub label: String,
pub monitor: usize,
pub scale: f64,
pub space: &'static str,
pub units: &'static str,
pub point: Point,
pub region: Shape,
pub score: Option<f64>,
pub delta: Option<Delta>,
}Expand description
Where to act for one selection, and what the answer is measured in.
Fields§
§index: usizeIndex into session.selections — this row’s identity.
label: String§monitor: usize§scale: f64The monitor’s DPI factor, so a consumer can check the conversion rather than trusting it.
space: &'static str§units: &'static str§point: PointThe point to act on.
In logical units this is the physical interior point converted, not an interior point of the converted region. The two can differ by a pixel, and this is the one that matters: a consumer clicks in logical points and the window server maps that back to physical, landing inside the region a human actually marked. Deriving it from the rounded-down shape would optimize for a number that nothing clicks.
region: ShapeThe region it came from, in the same space and units — so a caller
can draw what it is about to click. Converted independently of
point, so on a scaled display the two may round differently.
score: Option<f64>Match score from the relocation pass; absent without --relocate.
delta: Option<Delta>How far the region moved since the session was saved; absent
without --relocate, and absent with it when nothing moved.
Trait Implementations§
Source§impl Clone for Resolution
impl Clone for Resolution
Source§fn clone(&self) -> Resolution
fn clone(&self) -> Resolution
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more