Sha256: 443b7bc017749a48a1f8c4188bdc501c95f10a17ad7fc3648b0a613818ce8612
Contents?: true
Size: 1.02 KB
Versions: 1
Compression:
Stored size: 1.02 KB
Contents
require File.join(File.dirname(__FILE__), 'wxruby.rb') class MyApp WIDTH = 1920 HEIGHT = 1080 def on_init ARGV.each do |file_name| puts "Processing #{file_name}" @f = YAML.load_file(file_name) frame = Wx::Frame.new(nil, :size => [WIDTH, HEIGHT]) #Displays drawing. bitmap = Wx::Bitmap.new(WIDTH, HEIGHT) bitmap.draw do |surface| surface.brush = Wx::BLACK_BRUSH surface.draw_rectangle(0, 0, WIDTH, HEIGHT) end 10000.times do bitmap.draw {|surface| render(surface)} end bitmap.draw do |surface| surface.text_foreground = Wx::Colour.new(255, 255, 255, 255) surface.draw_text("©2009 Jay McGavren. Licensed under a Creative Commons Attribution-Share Alike 3.0 United States License: http://creativecommons.org/licenses/by-sa/3.0/us/", 10, HEIGHT - 20) end bitmap.save_file(file_name + ".png", Wx::BITMAP_TYPE_PNG) end exit end end app = MyApp.new app.main_loop
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
rubyonacid-0.2.0 | examples/quality_render.rb |