1
1
mirror of https://github.com/exyte/Macaw.git synced 2024-09-21 18:09:21 +03:00

Layer size fixed with stroke width

This commit is contained in:
Victor Sukochev 2016-08-09 14:40:43 +06:00
parent 122856b31d
commit 56b4bbcaee

View File

@ -67,6 +67,15 @@ public class Shape: Node {
bounds = form.bounds()
}
if let shapeStroke = self.stroke {
let r = shapeStroke.width / 2.0
bounds = Rect(
x: bounds.x - r,
y: bounds.y - r,
w: bounds.w + r * 2.0,
h: bounds.h + r * 2.0)
}
return bounds
}