SampleWindow
# File gtk2/sample/testgtk/gammacurve.rb, line 60 def GammaCurveSample.invoke @singleton = new if @singleton.nil? or @singleton.destroyed? @singleton.update unless @singleton.visible? @singleton.show_all end if @singleton.count == 4 @singleton.destroy end end
# File gtk2/sample/testgtk/gammacurve.rb, line 38 def initialize super("Gtk::GammaCurve") set_border_width(10) @curve = Gtk::GammaCurve.new add(@curve) @count = 0 end
# File gtk2/sample/testgtk/gammacurve.rb, line 47 def update max = 127 + (@count % 2) * 128 @curve.curve.set_range(0, max, 0, max) vec = [] max.times do |i| vec[i] = (127 / sqrt(max)) * sqrt(i) end @curve.curve.set_vector(max, vec) @count += 1 end
[Validate]
Generated with the Darkfish Rdoc Generator 2.