lib/processing/window.rb in processing-0.5.14 vs lib/processing/window.rb in processing-0.5.16

- old
+ new

@@ -18,11 +18,11 @@ Processing.instance_variable_set :@window, self @events = [] @error = nil @auto_resize = true - @canvas = Canvas.new self + @canvas = Canvas.new self, width, height @canvas_view = add CanvasView.new name: :canvas @overlay_view = @canvas_view.add Reflex::View.new name: :overlay super(*args, size: [width, height], **kwargs, &block) end @@ -202,14 +202,14 @@ class Window::Canvas attr_reader :image, :painter - def initialize(window) + def initialize(window, width, height) @image = nil @painter = window.painter - resize 1, 1 + resize width, height painter.miter_limit = 10 end def resize(width, height, pixel_density = nil) return false if width <= 0 || height <= 0