aalib-ruby 0.7.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,23 @@
1
+ $LOAD_PATH.unshift File.join(File.dirname(__FILE__), '..', 'lib')
2
+ require 'aalib'
3
+
4
+ def draw_diagonal_gradient(context)
5
+ width = context.imgwidth
6
+ height = context.imgheight
7
+ height.times do |y|
8
+ width.times do |x|
9
+ context.putpixel(x, y, 127*(x.to_f/width) + 127*(y.to_f/height))
10
+ end
11
+ end
12
+ end
13
+
14
+ def puts_hello_world(context)
15
+ msg = ' AA-lib: the ascii-art library '
16
+ blank = ' ' * msg.size
17
+ attr = AAlib::Attr::BOLD
18
+ col = (context.scrwidth - msg.size)/2
19
+ row = context.scrheight/2
20
+ context.puts(col, row - 1, attr, blank)
21
+ context.puts(col, row, attr, msg)
22
+ context.puts(col, row + 1, attr, blank)
23
+ end
metadata ADDED
@@ -0,0 +1,77 @@
1
+ --- !ruby/object:Gem::Specification
2
+ rubygems_version: 0.9.4
3
+ specification_version: 1
4
+ name: aalib-ruby
5
+ version: !ruby/object:Gem::Version
6
+ version: 0.7.1
7
+ date: 2007-10-28 00:00:00 -06:00
8
+ summary: a graphics context and input library for text terminals
9
+ require_paths:
10
+ - lib
11
+ email: pat@polycrystal.org
12
+ homepage: http://aalib-ruby.rubyforge.org/
13
+ rubyforge_project:
14
+ description: a graphics context and input library for text terminals
15
+ autorequire:
16
+ default_executable:
17
+ bindir: bin
18
+ has_rdoc: true
19
+ required_ruby_version: !ruby/object:Gem::Version::Requirement
20
+ requirements:
21
+ - - ">"
22
+ - !ruby/object:Gem::Version
23
+ version: 0.0.0
24
+ version:
25
+ platform: ruby
26
+ signing_key:
27
+ cert_chain:
28
+ post_install_message:
29
+ authors:
30
+ - Patrick Mahoney
31
+ files:
32
+ - .
33
+ - ./GPL
34
+ - ./INSTALL
35
+ - ./ChangeLog
36
+ - ./setup.rb
37
+ - ./lib
38
+ - ./lib/aalib.rb
39
+ - ./spec
40
+ - ./spec/aalib_spec.rb
41
+ - ./spec/spec_helper.rb
42
+ - ./spec/aalib_savedata_spec.rb
43
+ - ./spec/aalib_save_spec.rb
44
+ - ./spec/aalib_format_spec.rb
45
+ - ./spec/aalib_context_spec.rb
46
+ - ./spec/scratch
47
+ - ./spec/scratch/test_save
48
+ - ./spec/hello_world.txt
49
+ - ./Rakefile
50
+ - ./COPYING
51
+ - ./example
52
+ - ./example/save.rb
53
+ - ./example/hello_world.rb
54
+ - README
55
+ - ChangeLog
56
+ - COPYING
57
+ test_files: []
58
+
59
+ rdoc_options:
60
+ - --quiet
61
+ - --title
62
+ - AA-lib for Ruby
63
+ - --main
64
+ - README
65
+ - --inline-source
66
+ extra_rdoc_files:
67
+ - README
68
+ - ChangeLog
69
+ - COPYING
70
+ executables: []
71
+
72
+ extensions: []
73
+
74
+ requirements: []
75
+
76
+ dependencies: []
77
+