runner/screenshot_capture library

Constants

screenshotLayerPixelRatio → const double
Pixel ratio for OffsetLayer.toImageSync on a RenderView layer.

Functions

screenshotFittedScreenRect({required Size imageSize, required Rect screenRect}) → Rect
Destination rect for a capture inside the device-frame screen hole.
screenshotHighlightPercentRect({required Rect rectInImagePixels, required Size imageSize, DeviceInfo? frameDevice}) → Rect
Converts a rect in capture-image pixels into HTML overlay percentages.
screenshotImageRegionHasContrast({required Image image, required Rect region, double minDistance = 18}) → Future<bool>
Whether region looks painted relative to nearby background pixels.
screenshotLayerBounds({required Size physicalSize, required Rect paintBounds}) → Rect
Layer-local rectangle to pass to OffsetLayer.toImageSync for a RenderView.
screenshotLogicalRectToImagePixels({required Rect logicalRect, required Size logicalSize, required Size imageSize}) → Rect
Maps a widget rect in logical pixels onto the rasterized screenshot.