lib/rabbit/renderer/engine/cairo.rb in rabbit-2.0.4 vs lib/rabbit/renderer/engine/cairo.rb in rabbit-2.0.5

- old
+ new

@@ -264,10 +264,14 @@ draw_scaled_pixbuf = params[:draw_scaled_pixbuf] draw_scaled_pixbuf = @draw_scaled_image if draw_scaled_pixbuf.nil? width = (params[:width] || pixbuf.width).to_f height = (params[:height] || pixbuf.height).to_f - return pixbuf if [width, height] == [pixbuf.width, pixbuf.height] + if [width, height] == [pixbuf.width, pixbuf.height] + @context.set_source_pixbuf(pixbuf, 0, 0) + return + end + case draw_scaled_pixbuf when true scaled_pixbuf = pixbuf.scale(width, height) @context.set_source_pixbuf(scaled_pixbuf, 0, 0) when false