Sha256: 4c397e963d92c4c2375d99428cfe188cb9a66e9c5134937a4f76a2a2a7579460

Contents?: true

Size: 409 Bytes

Versions: 3

Compression:

Stored size: 409 Bytes

Contents

module Mireru
  module Widget
    class Image
      class << self
        def create(file, width, height)
          image = Gtk::Image.new
          pixbuf = Gdk::Pixbuf.new(file)
          if pixbuf.width > width || pixbuf.height > height
            pixbuf = Gdk::Pixbuf.new(file, width, height)
          end
          image.pixbuf = pixbuf
          widget = image
        end
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
mireru-0.2.1 lib/mireru/widget/image.rb
mireru-0.2.0 lib/mireru/widget/image.rb
mireru-0.1.9 lib/mireru/widget/image.rb