class GdkPixbuf::Pixbuf
Constants
- InterpType
Public Instance Methods
scale_max(max_size, interp = GdkPixbuf::Pixbuf::InterpType::BILINEAR, max_scale = 1.0)
click to toggle source
# File lib/morandi/utils.rb, line 120 def scale_max(max_size, interp = GdkPixbuf::Pixbuf::InterpType::BILINEAR, max_scale = 1.0) mul = (max_size / [width,height].max.to_f) mul = [max_scale = 1.0,mul].min scale(width * mul, height * mul, interp) end