diff options
| author | Laurenz <laurmaedje@gmail.com> | 2022-12-08 18:44:31 +0100 |
|---|---|---|
| committer | Laurenz <laurmaedje@gmail.com> | 2022-12-08 19:03:23 +0100 |
| commit | e6857f810e8868d95ebe78753568016b6dea12ca (patch) | |
| tree | 1b33a10470b9dff1d3c5e36ea4fd81fdf6b114cf /library/src/visualize/image.rs | |
| parent | 11c7ceb29e762f6dd1d093d9fdb57e9612a92df0 (diff) | |
Copyable regions
Diffstat (limited to 'library/src/visualize/image.rs')
| -rw-r--r-- | library/src/visualize/image.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/library/src/visualize/image.rs b/library/src/visualize/image.rs index 48764c37..205c8a7d 100644 --- a/library/src/visualize/image.rs +++ b/library/src/visualize/image.rs @@ -41,14 +41,14 @@ impl Layout for ImageNode { &self, _: &mut Vt, styles: StyleChain, - regions: &Regions, + regions: Regions, ) -> SourceResult<Fragment> { let pxw = self.0.width() as f64; let pxh = self.0.height() as f64; let px_ratio = pxw / pxh; // Find out whether the image is wider or taller than the target size. - let &Regions { first, expand, .. } = regions; + let Regions { first, expand, .. } = regions; let region_ratio = first.x / first.y; let wide = px_ratio > region_ratio; |
