Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Properly support tiling clip mask images. #3220

Merged
merged 11 commits into from Oct 23, 2018

wrench: Add support for reading tiled mask images.

  • Loading branch information
emilio committed Oct 23, 2018
commit 527910d5c2bb60a1c7fbbb4fb41e1ab7c8b8c451
@@ -405,10 +405,10 @@ impl YamlFrameReader {
}

pub fn add_or_get_image(
&mut self,
file: &Path,
tiling: Option<i64>,
wrench: &mut Wrench,
&mut self,
file: &Path,
tiling: Option<i64>,
wrench: &mut Wrench,
) -> (ImageKey, LayoutSize) {
let key = (file.to_owned(), tiling);
if let Some(k) = self.image_map.get(&key) {
@@ -600,8 +600,9 @@ impl YamlFrameReader {
}
};

let tiling = item["tile-size"].as_i64();
let (image_key, image_dims) =
self.add_or_get_image(&file, None, wrench);
self.add_or_get_image(&file, tiling, wrench);
let image_rect = item["rect"]
.as_rect()
.unwrap_or(LayoutRect::new(LayoutPoint::zero(), image_dims));
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.