         self.size = size
     }
     
-    public var center: CGPoint
+    var center: CGPoint
         {
         get { return CGPoint(x: centerX, y: centerY) }
         set { centerX = newValue.x; centerY = newValue.y }

        size.height = height - top - bottom
    }
    
    public mutating func inset(topLeft topLeft: CGSize)
    {
        inset(topLeft.height, left: topLeft.width, bottom: 0, right: 0)
    }
    
    public mutating func inset(topRight topRight: CGSize)
    {
        inset(topRight.height, right: topRight.width, bottom: 0, left: 0)
    }
    
    public mutating func inset(bottomLeft bottomLeft: CGSize)
    {
        inset(bottom: bottomLeft.height, left: bottomLeft.width)
    }
    
    public mutating func inset(bottomRight bottomRight: CGSize)
    {
        inset(bottom: bottomRight.height, right: bottomRight.width)
    }
}

// MARK: - Edge points
extension CGRect
{
    public var topLeft: CGPoint
        {
        get { return CGPoint(x: left, y: top) }
        set { left = newValue.x; top = newValue.y }
    }
    
    public var topCenter: CGPoint
        {
        get { return CGPoint(x: centerX, y: top) }
        set { centerX = newValue.x; top = newValue.y }
    }
    
    public var topRight: CGPoint
        {
        get { return CGPoint(x: right, y: top) }
        set { right = newValue.x; top = newValue.y }
    }
    
    public var centerLeft: CGPoint
        {
        get { return CGPoint(x: left, y: centerY) }
        set { left = newValue.x; centerY = newValue.y }
    }
    
    public var centerRight: CGPoint
        {
        get { return CGPoint(x: right, y: centerY) }
        set { right = newValue.x; centerY = newValue.y }
    }
    
    public var bottomLeft: CGPoint
        {
        get { return CGPoint(x: left, y: bottom) }
        set { left = newValue.x; bottom = newValue.y }
    }
    
    public var bottomCenter: CGPoint
        {
        get { return CGPoint(x: centerX, y: bottom) }
        set { centerX = newValue.x; bottom = newValue.y }
    }
    
    public var bottomRight: CGPoint
        {
        get { return CGPoint(x: right, y: bottom) }
        set { right = newValue.x; bottom = newValue.y }

    
    // MARK: shortcuts
    
    var x: CGFloat
        {
        get { return origin.x }
        set { origin.x = newValue }
    }
    
    var y: CGFloat
        {
        get { return origin.y }
        set { origin.y = newValue }
