pub struct PixelCoverageTracker { /* private fields */ }Expand description
Pixel coverage tracker for grid-based UI coverage
Implementations§
Source§impl PixelCoverageTracker
impl PixelCoverageTracker
Sourcepub fn new(width: u32, height: u32, grid_cols: u32, grid_rows: u32) -> Self
pub fn new(width: u32, height: u32, grid_cols: u32, grid_rows: u32) -> Self
Create a new tracker with given resolution and grid size
Sourcepub fn builder() -> PixelCoverageTrackerBuilder
pub fn builder() -> PixelCoverageTrackerBuilder
Create a builder for more complex configuration
Sourcepub fn resolution(&self) -> (u32, u32)
pub fn resolution(&self) -> (u32, u32)
Get screen resolution
Sourcepub fn grid_config(&self) -> &GridConfig
pub fn grid_config(&self) -> &GridConfig
Get grid configuration
Sourcepub fn record_interaction(&mut self, point: Point)
pub fn record_interaction(&mut self, point: Point)
Record an interaction at a point
Sourcepub fn record_region(&mut self, region: Region)
pub fn record_region(&mut self, region: Region)
Record coverage for a region
Sourcepub fn record_element(&mut self, _id: &str, bounds: Region)
pub fn record_element(&mut self, _id: &str, bounds: Region)
Record coverage for an element by ID
Sourcepub fn generate_report(&self) -> PixelCoverageReport
pub fn generate_report(&self) -> PixelCoverageReport
Generate coverage report
Sourcepub fn uncovered_regions(&self) -> Vec<Region>
pub fn uncovered_regions(&self) -> Vec<Region>
Get list of uncovered regions
Sourcepub fn cells(&self) -> &Vec<Vec<CoverageCell>>
pub fn cells(&self) -> &Vec<Vec<CoverageCell>>
Get cells for rendering
Sourcepub fn terminal_heatmap(&self) -> TerminalHeatmap
pub fn terminal_heatmap(&self) -> TerminalHeatmap
Generate terminal heatmap
Sourcepub fn png_heatmap(&self, width: u32, height: u32) -> PngHeatmap
pub fn png_heatmap(&self, width: u32, height: u32) -> PngHeatmap
Generate PNG heatmap exporter
Trait Implementations§
Source§impl Clone for PixelCoverageTracker
impl Clone for PixelCoverageTracker
Source§fn clone(&self) -> PixelCoverageTracker
fn clone(&self) -> PixelCoverageTracker
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for PixelCoverageTracker
impl RefUnwindSafe for PixelCoverageTracker
impl Send for PixelCoverageTracker
impl Sync for PixelCoverageTracker
impl Unpin for PixelCoverageTracker
impl UnsafeUnpin for PixelCoverageTracker
impl UnwindSafe for PixelCoverageTracker
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more