class CompositorNode::Cropper
Attributes
height[RW]
source[RW]
width[RW]
x_offset[RW]
y_offset[RW]
Public Class Methods
new(options = {})
click to toggle source
# File lib/compositor_node/cropper.rb, line 8 def initialize(options = {}) @source = options[:source] @width = options[:width] @height = options[:height] @x_offset = options[:x_offset] || 0 @y_offset = options[:y_offset] || 0 end
Public Instance Methods
execute()
click to toggle source
# File lib/compositor_node/cropper.rb, line 16 def execute raise MissingDimensionCropError unless @width && @height Engine.crop(@source.execute, @x_offset, @y_offset, @width, @height) end