Method: CGRect#shrink

Defined in:
lib/geomotion/cg_rect.rb

#shrink(size, options = nil) ⇒ Object



578
579
580
581
582
583
584
585
586
587
# File 'lib/geomotion/cg_rect.rb', line 578

def shrink(size, options=nil)
  if size.is_a? Numeric
    size = CGSize.new(size, size)
  end
  rect = CGRectInset(self, size[0], size[1])
  if options
    return rect.apply(options)
  end
  return rect
end