Class: VideoBlur::Box
- Inherits:
-
Object
- Object
- VideoBlur::Box
- Defined in:
- lib/video_blur/box.rb
Instance Method Summary collapse
- #height ⇒ Object
-
#initialize(x:, y:, width:, height:, ratio: 1) ⇒ Box
constructor
A new instance of Box.
- #width ⇒ Object
- #x ⇒ Object
- #y ⇒ Object
Constructor Details
#initialize(x:, y:, width:, height:, ratio: 1) ⇒ Box
Returns a new instance of Box.
3 4 5 6 7 8 9 |
# File 'lib/video_blur/box.rb', line 3 def initialize(x:, y:, width:, height:, ratio: 1) @x = x @y = y @width = width @height = height @ratio = ratio end |
Instance Method Details
#height ⇒ Object
23 24 25 |
# File 'lib/video_blur/box.rb', line 23 def height (@height * @ratio).to_i end |
#width ⇒ Object
19 20 21 |
# File 'lib/video_blur/box.rb', line 19 def width (@width * @ratio).to_i end |
#x ⇒ Object
11 12 13 |
# File 'lib/video_blur/box.rb', line 11 def x (@x * @ratio).to_i end |
#y ⇒ Object
15 16 17 |
# File 'lib/video_blur/box.rb', line 15 def y (@y * @ratio).to_i end |