Sha256: bec84a741fbcb0193156dea9bef8d35a619c955c5d6e9d217994e490395b60d8
Contents?: true
Size: 736 Bytes
Versions: 6
Compression:
Stored size: 736 Bytes
Contents
# -*- coding: utf-8 -*- %w[xot rays reflex] .map {|s| File.expand_path "../../#{s}/lib", __dir__} .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
6 entries across 6 versions & 1 rubygems