[macruby-changes] [621] MacRuby/trunk/lib/hotcocoa/mappings/image_view.rb
source_changes at macosforge.org
source_changes at macosforge.org
Wed Sep 24 23:11:14 PDT 2008
Revision: 621
http://trac.macosforge.org/projects/ruby/changeset/621
Author: rich at infoether.com
Date: 2008-09-24 23:11:13 -0700 (Wed, 24 Sep 2008)
Log Message:
-----------
scaling image views
Modified Paths:
--------------
MacRuby/trunk/lib/hotcocoa/mappings/image_view.rb
Modified: MacRuby/trunk/lib/hotcocoa/mappings/image_view.rb
===================================================================
--- 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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.macosforge.org/pipermail/macruby-changes/attachments/20080924/8469c007/attachment-0001.html
More information about the macruby-changes
mailing list