Sha256: 16f7d968fa444bd70d30fb4064cee294ca12338afa8c8dc7f6d0766fce59eb9b

Contents?: true

Size: 384 Bytes

Versions: 4

Compression:

Stored size: 384 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
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
purplish-frame-0.0.4 lib/purplish-frame/non-ui/cg_rect.rb
purplish-frame-0.0.3 lib/purplish-frame/non-ui/cg_rect.rb
purplish-frame-0.0.2 lib/purplish-frame/cg_rect.rb
purplish-frame-0.0.1 lib/purplish-frame/cg_rect.rb