lib/psd/renderer/canvas_management.rb in psd-2.1.2 vs lib/psd/renderer/canvas_management.rb in psd-3.1.2
- old
+ new
@@ -3,12 +3,12 @@
module CanvasManagement
def active_canvas
@canvas_stack.last
end
- def create_group_canvas(node, width=@width, height=@height)
+ def create_group_canvas(node, width = @width, height = @height, opts = {})
PSD.logger.debug "Group canvas created. Node = #{node.name || ":root:"}, width = #{width}, height = #{height}"
- push_canvas Canvas.new(node, width, height)
+ push_canvas Canvas.new(node, width, height, @opts.merge(opts))
end
def push_canvas(canvas)
@canvas_stack << canvas
end
\ No newline at end of file