Sha256: 57707ccc0518942d5d8767a32fcbbafec654238fb2f875a5e4dacd3a08a3dbaf

Contents?: true

Size: 631 Bytes

Versions: 3

Compression:

Stored size: 631 Bytes

Contents

require 'whirled_peas'

WhirledPeas.register_theme(:theme_test) do |theme|
  theme.bg_color = :bright_white
  theme.color = :blue
  theme.border_color = :bright_green
  theme.axis_color = :bright_red
  theme.title_font = :default
end

class TemplateFactory
  def build(*)
    WhirledPeas.template(:theme_test) do |composer, settings|
      settings.full_border
      settings.flow = :t2b
      composer.add_text do |_, settings|
        settings.title_font = :theme
        'OOH'
      end
      composer.add_graph do |_, settings|
        settings.height = 12
        20.times.map { |i| Math.sqrt(i) }
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
whirled_peas-0.12.0 screen_test/elements/theme.rb
whirled_peas-0.11.1 screen_test/elements/theme.rb
whirled_peas-0.11.0 screen_test/elements/theme.rb