leftCenterRect function
Returns a new Rectangle at the left-center of area with width and height.
Upstream: LeftCenterRect in third_party/ultraviolet/layout.go.
Implementation
Rectangle leftCenterRect(Rectangle area, int width, int height) {
final centerY = area.minY + area.height ~/ 2;
final minY = centerY - height ~/ 2;
return rect(area.minX, minY, width, height).intersect(area);
}