Sha256: ecb4c9a05492d11b83ad82bfa903a6cc3d7c6844b5f90e6579ad2ad680e987bd
Contents?: true
Size: 1.22 KB
Versions: 1
Compression:
Stored size: 1.22 KB
Contents
# -*- coding: utf-8 -*- # # Copyright (C) 2013 Kouhei Sutou <kou@clear-code.com> # # License: CC BY-SA 3.0 @clear_code_font_family = find_font_family("Andika") include_theme("clear-code") match(TitleSlide, Title) do |titles| set_font_family(titles, find_font_family("Burnstown Dam")) end unless print? match(Slide, "**", PreformattedBlock) do |blocks| blocks.each do |block| next if block.slide["evaluate-code"] != "true" name = "render-cairo" block.delete_post_draw_proc_by_name(name) block.add_pre_draw_proc(name) do |canvas, x, y, w, h, simulation| unless simulation context = canvas.renderer.instance_variable_get(:@context) context.save do x_fuzzy = rand / 10 x_fuzzy *= -1 if rand(2).zero? y_fuzzy = rand / 100 y_fuzzy *= -1 if rand(2).zero? context.translate( canvas.width * (0.6 + x_fuzzy), -canvas.height * (0.1 + y_fuzzy)) context.scale(4, 4) red = rand green = rand blue = rand context.set_source(red, green, blue) eval(block.text) end end [x, y, w, h] end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
rabbit-slide-kou-rubykaigi-2013-2013.6.1.9 | theme.rb |