Add thumbnails for layers (#286)

Fixes: #285
This commit is contained in:
TrueDoctor
2021-07-21 11:30:49 +02:00
committed by Keavon Chambers
parent 1f1c307211
commit 87f65cd831
7 changed files with 35 additions and 3 deletions

View File

@@ -175,6 +175,10 @@ impl Layer {
self.data.to_kurbo_path(self.transform, self.style)
}
pub fn current_bounding_box(&self) -> Option<[DVec2; 2]> {
self.bounding_box(self.transform, self.style)
}
pub fn bounding_box(&self, transform: glam::DAffine2, style: style::PathStyle) -> Option<[DVec2; 2]> {
if let Ok(folder) = self.as_folder() {
folder.bounding_box(transform)