Modified: MacRuby/trunk/lib/hotcocoa/mappings/image_view.rb (620 => 621)
--- MacRuby/trunk/lib/hotcocoa/mappings/image_view.rb 2008-09-25 04:30:37 UTC (rev 620)
+++ MacRuby/trunk/lib/hotcocoa/mappings/image_view.rb 2008-09-25 06:11:13 UTC (rev 621)
@@ -10,6 +10,12 @@
:button => NSImageFrameButton
}
+ constant :scale, {
+ :fit => NSScaleToFit,
+ :none => NSScaleNone,
+ :proportionally => NSScaleProportionally
+ }
+
def init_with_options(image_view, options)
image_view.initWithFrame options.delete(:frame)
end
@@ -28,6 +34,10 @@
setImage(NSImage.alloc.initWithContentsOfFile(file))
end
+ def scale=(value)
+ setImageScaling(value)
+ end
+
end
end