Module: ImageProxyRuby::Operations::RectangleCrop
- Included in:
- Image
- Defined in:
- lib/image_proxy/operations/rectangle_crop.rb
Overview
add crop functionality to image
Instance Method Summary collapse
Instance Method Details
#rectangle_crop(start_x: 0, start_y: 0, width: nil, height: nil) ⇒ Object
7 8 9 10 11 12 13 14 |
# File 'lib/image_proxy/operations/rectangle_crop.rb', line 7 def rectangle_crop(start_x: 0, start_y: 0, width: nil, height: nil) operations_str = "cx#{start_x}cy#{start_y}" operations_str += "cw#{width}" if width operations_str += "ch#{height}" if height operations << operations_str self end |