File: immediate.rb

package info (click to toggle)
libtioga-ruby 1.11-1
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 10,460 kB
  • ctags: 3,986
  • sloc: ansic: 38,451; ruby: 16,774; sh: 172; makefile: 111
file content (38 lines) | stat: -rw-r--r-- 714 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
# immediate.rb

# to get the pdf's created, just run this file.
# ruby < immediate.rb

require 'rubygems'
require 'Tioga/FigureMaker'

include Tioga
include FigureConstants

FigureMaker.exec do |t| 
   # t is FigureMaker.default
   t.default_page_width = 72*3
   t.default_page_height = 72*2
   t.default_enter_page_function
   t.make_pdf('blue') do
      t.fill_color = Blue
      t.fill_frame
   end   
   t.make_pdf('green') do
      t.fill_color = Green
      t.fill_frame
   end   
end

# here's an alternative way to make a pdf
FigureMaker.make_pdf('red') do |t|
   t.default_page_width = 72*2
   t.default_page_height = 72*3
   t.default_enter_page_function
   t.fill_color = Red
   t.fill_frame
end