Sha256: 13b483c60f7207c1c20cce419ffe9c074e504319ceb67da8058d19d2504f9900
Contents?: true
Size: 740 Bytes
Versions: 16
Compression:
Stored size: 740 Bytes
Contents
# -*- coding: utf-8 -*- %w[xot rays reflex] .map {|s| File.expand_path "../../../#{s}/lib", __FILE__} .each {|s| $:.unshift s if !$:.include?(s) && File.directory?(s)} require 'reflex' include Reflex win = Window.new do image = Image.new(32, 32).tap do |img| img.paint do fill :white rect img.bounds fill :red ellipse img.bounds.inset_by(2, 2) end end 256.times do add ImageView.new {set data: image} end on :update do redraw end after :draw do |e| e.painter.push fill: :black do rect 0, 0, 100, 40 fill :white text "#{e.fps.to_i} FPS", 10, 10 end end title 'Many Image Views' frame 100, 100, 500, 400 end Reflex.start do win.show end
Version data entries
16 entries across 16 versions & 1 rubygems