Sha256: 1e3a514d776db31fdfa421ada77a923d716f467d67512be8d77269a65a716b54

Contents?: true

Size: 441 Bytes

Versions: 7

Compression:

Stored size: 441 Bytes

Contents

class CGRect
  include PurplishFrame::Rect

  def top
    origin.y
  end

  def top=(y)
    origin.y = y
  end

  def bottom
    origin.y+size.height
  end

  def bottom=(bottom)
    origin.y = bottom - size.height
  end

  def center_y
    top+size.height/2
  end

  def center_y=(center_y)
    self.top = center_y-size.height/2
  end

  def height=(h)
    size.height = h
  end

  def inset(dx, dy)
    CGRectInset(self, dx, dy)
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
purplish-frame-0.0.11 lib/purplish-frame/non-ui/cg_rect.rb
purplish-frame-0.0.10 lib/purplish-frame/non-ui/cg_rect.rb
purplish-frame-0.0.9 lib/purplish-frame/non-ui/cg_rect.rb
purplish-frame-0.0.8 lib/purplish-frame/non-ui/cg_rect.rb
purplish-frame-0.0.7 lib/purplish-frame/non-ui/cg_rect.rb
purplish-frame-0.0.6 lib/purplish-frame/non-ui/cg_rect.rb
purplish-frame-0.0.5 lib/purplish-frame/non-ui/cg_rect.rb