Sha256: 482170828f8de9f236b3140f444466a9d07172b34d94c7acd8e04ddf7238e3f0

Contents?: true

Size: 1.84 KB

Versions: 5

Compression:

Stored size: 1.84 KB

Contents

# coding: utf-8

example :tblock_styles, 'Set the styles of Tblock in the Editor' do |t|
  Thinreports::Report.generate filename: t.output_filename do |report|
    report.use_layout t.layout_filename

    report.start_new_page do |page|
      page.item(:space_single_helvetica).value('Char Space in Single(Helvetica)')
      page.item(:space_single_ipamincho).value = '文字間隔 in 単行(IPA明朝)'

      page[:space_multi_times] = "Char Space\nin Multiple(Times New Roman)"
      page.item(:space_multi_ipamincho).value("文字間隔\nin 複数行(IPA明朝)")

      page.values(left_top:       '左上揃え',
                  left_center:    '左中央揃え',
                  left_bottom:    '左下揃え',
                  center_top:     '中央上揃え',
                  center_center: '中央揃え',
                  center_bottom: '中央下揃え',
                  right_top:      '右上揃え',
                  right_center:   '右中央揃え',
                  right_bottom:   '右下揃え')

      page.item(:line_height).value("行間隔2.0\n日本語\nThinreports")
    end

    report.start_new_page layout: t.resource('font_size.tlf') do |page|
      page[:text_single24].style(:font_size, 24)
      page[:text_single32].style(:font_size, 32)

      page.item(:text_multiple24).style(:font_size, 24)
      page.item(:text_multiple32).style(:font_size, 32)

      page.item(:block_single18).value('サイズ18')
      page.item(:block_single24).style(:font_size, 24).value('サイズ24')
      page.item(:block_single32).style(:font_size, 32).value('サイズ32')

      page.item(:block_multiple18).value("サイズ18\nサイズ18")
      page.item(:block_multiple24).style(:font_size, 24).value("サイズ24\nサイズ24")
      page.item(:block_multiple32).style(:font_size, 32).value("サイズ32\nサイズ32")
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
thinreports-0.9.1 examples/tblock_styles/tblock_styles.rb
thinreports-0.9.0 examples/tblock_styles/tblock_styles.rb
thinreports-0.8.2 examples/tblock_styles/tblock_styles.rb
thinreports-0.8.1 examples/tblock_styles/tblock_styles.rb
thinreports-0.8.0 examples/tblock_styles/tblock_styles.rb