pub struct ScreenshotMap {
pub width: u32,
pub height: u32,
pub scale: f64,
pub logical_width: u32,
pub logical_height: u32,
pub origin: MapPoint,
pub fit: String,
pub pad: MapPoint,
pub content_width: u32,
pub content_height: u32,
pub map: MapFormulas,
}Expand description
Map attached to every screenshot and stored in the session cache.
content_width and content_height are the drawn image inside any
letterbox. pad is only the top-left inset, so an odd leftover pixel
stays on the right or bottom and the formula stays exact.
Fields§
§width: u32Output pixel width, including letterbox padding.
height: u32Output pixel height, including letterbox padding.
scale: f64Capture backing scale. This is not the downscale ratio.
logical_width: u32Source width in screen points.
logical_height: u32Source height in screen points.
origin: MapPointTop-left of the captured area in screen points.
fit: Stringwidth, none, or canvas.
pad: MapPointTop-left letterbox inset in output pixels.
content_width: u32Drawn width inside the letterbox.
content_height: u32Drawn height inside the letterbox.
map: MapFormulasRemap formulas.
Trait Implementations§
Source§impl Clone for ScreenshotMap
impl Clone for ScreenshotMap
Source§impl Debug for ScreenshotMap
impl Debug for ScreenshotMap
Source§impl<'de> Deserialize<'de> for ScreenshotMap
impl<'de> Deserialize<'de> for ScreenshotMap
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for ScreenshotMap
impl PartialEq for ScreenshotMap
Source§impl Serialize for ScreenshotMap
impl Serialize for ScreenshotMap
impl StructuralPartialEq for ScreenshotMap
Auto Trait Implementations§
impl Freeze for ScreenshotMap
impl RefUnwindSafe for ScreenshotMap
impl Send for ScreenshotMap
impl Sync for ScreenshotMap
impl Unpin for ScreenshotMap
impl UnsafeUnpin for ScreenshotMap
impl UnwindSafe for ScreenshotMap
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