graphit 0.0.5 → 0.0.6

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 408bdfa48282c36e44e87556dd1bb275e3135542
4
- data.tar.gz: 15ce09cd169e26f9b5154568b869898305ac1633
3
+ metadata.gz: cff85df062116029645654037094f8c056299c7c
4
+ data.tar.gz: bca19ead37b0ba0690cd87601a5571558e35e773
5
5
  SHA512:
6
- metadata.gz: 598e94d4cf32556a8f1610557ed7211e19fb6bd8ba1a19390d6c860ebc74075bbc2b9942b4f96d6aef1c6915a8fb068ce8c4b0a2faeab7f184a0c653bec07b69
7
- data.tar.gz: b94dec7e45933ded040340222efb45c26b23f84aa16ccabefad3aa035b99ae16d6650054dcf5d86fa263e36a232912ba917720a67471caae7fa1a0fd69e0e9ed
6
+ metadata.gz: 9d0ff1e0b05124e6f7d2c69e69268b3ea46e91a1fa1132b758c932718964b6ace2176f910198057a24c1879825c848100d5a9166ded6f3a72de7f268cf160ead
7
+ data.tar.gz: 5c53f8bc1790c42969733bf28486e8f6639daf09468af0ad50262ff409e0a87098e855a3eab64f115628b2176d325f1b1d0cf7cad8ee9b1c9e1bcc53a240bef2
data/exe/graphit CHANGED
@@ -1,5 +1,7 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
+ require 'graphit'
4
+
3
5
  require 'bin_utils' # For Speed
4
6
  require 'optparse'
5
7
 
@@ -43,109 +45,7 @@ end.parse!
43
45
 
44
46
  options[:outputfile] = "graph.bmp" if options[:outputfile].nil?
45
47
 
46
-
47
- @characters = {}
48
-
49
- @characters["0"] = [[0,0,1,0,0],
50
- [0,1,0,1,0],
51
- [1,0,0,0,1],
52
- [1,0,0,0,1],
53
- [1,0,0,0,1],
54
- [1,0,0,0,1],
55
- [0,1,0,1,0],
56
- [0,0,1,0,0]]
57
-
58
- @characters["1"] = [[0,0,1,0,0],
59
- [0,1,1,0,0],
60
- [1,0,1,0,0],
61
- [0,0,1,0,0],
62
- [0,0,1,0,0],
63
- [0,0,1,0,0],
64
- [0,0,1,0,0],
65
- [1,1,1,1,1]]
66
-
67
-
68
- @characters["2"] = [[0,1,1,1,0],
69
- [1,0,0,0,1],
70
- [0,0,0,1,0],
71
- [0,0,1,0,0],
72
- [0,1,0,0,0],
73
- [1,0,0,0,0],
74
- [1,0,0,0,0],
75
- [1,1,1,1,1]]
76
-
77
- @characters["3"] = [[0,1,1,1,0],
78
- [1,0,0,0,1],
79
- [0,0,0,0,1],
80
- [0,0,1,1,0],
81
- [0,0,0,0,1],
82
- [0,0,0,0,1],
83
- [1,0,0,0,1],
84
- [0,1,1,1,0]]
85
-
86
- @characters["4"] = [[0,0,0,0,1],
87
- [0,0,0,1,1],
88
- [0,0,1,0,1],
89
- [0,1,0,0,1],
90
- [1,1,1,1,1],
91
- [0,0,0,0,1],
92
- [1,0,0,0,1],
93
- [0,0,0,0,1]]
94
-
95
- @characters["5"] = [[1,1,1,1,1],
96
- [1,0,0,0,0],
97
- [1,0,0,0,0],
98
- [1,1,1,1,0],
99
- [1,0,0,0,1],
100
- [0,0,0,0,1],
101
- [1,0,0,0,1],
102
- [0,1,1,1,0]]
103
-
104
- @characters["6"] = [[0,0,1,1,1],
105
- [0,1,0,0,0],
106
- [1,0,0,0,0],
107
- [1,1,1,1,0],
108
- [1,0,0,0,1],
109
- [1,0,0,0,1],
110
- [1,0,0,0,1],
111
- [0,1,1,1,0]]
112
-
113
- @characters["7"] = [[1,1,1,1,1],
114
- [0,0,0,0,1],
115
- [0,0,0,0,1],
116
- [0,0,0,1,0],
117
- [0,0,0,1,0],
118
- [0,0,0,1,0],
119
- [0,0,1,0,0],
120
- [0,0,1,0,0]]
121
-
122
- @characters["8"] = [[0,1,1,1,0],
123
- [1,0,0,0,1],
124
- [1,0,0,0,1],
125
- [0,1,1,1,0],
126
- [1,0,0,0,1],
127
- [1,0,0,0,1],
128
- [1,0,0,0,1],
129
- [0,1,1,1,0]]
130
-
131
- @characters["9"] = [[0,1,1,1,0],
132
- [1,0,0,0,1],
133
- [1,0,0,0,1],
134
- [1,0,0,0,1],
135
- [0,1,1,1,1],
136
- [0,0,0,0,1],
137
- [1,0,0,0,1],
138
- [0,1,1,1,0]]
139
-
140
-
141
- @characters["A"] = [[0,0,1,0,0],
142
- [0,1,0,1,0],
143
- [1,0,0,0,1],
144
- [1,1,1,1,1],
145
- [1,0,0,0,1],
146
- [1,0,0,0,1],
147
- [1,0,0,0,1],
148
- [1,0,0,0,1]]
48
+ @characters = Graphit.pixel_font
149
49
 
150
50
  @h = options[:height] || 300
151
51
  @w = options[:width] || 1050
@@ -0,0 +1,108 @@
1
+ module Graphit
2
+ def self.pixel_font
3
+ @characters = {}
4
+ @characters["0"] = [[0,0,1,0,0],
5
+ [0,1,0,1,0],
6
+ [1,0,0,0,1],
7
+ [1,0,0,0,1],
8
+ [1,0,0,0,1],
9
+ [1,0,0,0,1],
10
+ [0,1,0,1,0],
11
+ [0,0,1,0,0]]
12
+
13
+ @characters["1"] = [[0,0,1,0,0],
14
+ [0,1,1,0,0],
15
+ [1,0,1,0,0],
16
+ [0,0,1,0,0],
17
+ [0,0,1,0,0],
18
+ [0,0,1,0,0],
19
+ [0,0,1,0,0],
20
+ [1,1,1,1,1]]
21
+
22
+
23
+ @characters["2"] = [[0,1,1,1,0],
24
+ [1,0,0,0,1],
25
+ [0,0,0,0,1],
26
+ [0,0,0,1,0],
27
+ [0,0,1,0,0],
28
+ [0,1,0,0,0],
29
+ [1,0,0,0,0],
30
+ [1,1,1,1,1]]
31
+
32
+ @characters["3"] = [[0,1,1,1,0],
33
+ [1,0,0,0,1],
34
+ [0,0,0,0,1],
35
+ [0,0,1,1,0],
36
+ [0,0,0,0,1],
37
+ [0,0,0,0,1],
38
+ [1,0,0,0,1],
39
+ [0,1,1,1,0]]
40
+
41
+ @characters["4"] = [[0,0,0,1,0],
42
+ [0,0,1,1,0],
43
+ [0,1,0,1,0],
44
+ [1,0,0,1,0],
45
+ [1,0,0,1,0],
46
+ [1,1,1,1,1],
47
+ [0,0,0,1,0],
48
+ [0,0,0,1,0]]
49
+
50
+ @characters["5"] = [[1,1,1,1,1],
51
+ [1,0,0,0,0],
52
+ [1,0,0,0,0],
53
+ [1,1,1,1,0],
54
+ [1,0,0,0,1],
55
+ [0,0,0,0,1],
56
+ [1,0,0,0,1],
57
+ [0,1,1,1,0]]
58
+
59
+ @characters["6"] = [[0,0,1,1,1],
60
+ [0,1,0,0,0],
61
+ [1,0,0,0,0],
62
+ [1,1,1,1,0],
63
+ [1,0,0,0,1],
64
+ [1,0,0,0,1],
65
+ [1,0,0,0,1],
66
+ [0,1,1,1,0]]
67
+
68
+ @characters["7"] = [[1,1,1,1,1],
69
+ [0,0,0,0,1],
70
+ [0,0,0,0,1],
71
+ [0,0,0,1,0],
72
+ [0,0,0,1,0],
73
+ [0,0,0,1,0],
74
+ [0,0,1,0,0],
75
+ [0,0,1,0,0]]
76
+
77
+ @characters["8"] = [[0,1,1,1,0],
78
+ [1,0,0,0,1],
79
+ [1,0,0,0,1],
80
+ [0,1,1,1,0],
81
+ [1,0,0,0,1],
82
+ [1,0,0,0,1],
83
+ [1,0,0,0,1],
84
+ [0,1,1,1,0]]
85
+
86
+ @characters["9"] = [[0,1,1,1,0],
87
+ [1,0,0,0,1],
88
+ [1,0,0,0,1],
89
+ [1,0,0,0,1],
90
+ [0,1,1,1,1],
91
+ [0,0,0,0,1],
92
+ [1,0,0,0,1],
93
+ [0,1,1,1,0]]
94
+
95
+
96
+ @characters["A"] = [[0,0,1,0,0],
97
+ [0,1,0,1,0],
98
+ [1,0,0,0,1],
99
+ [1,1,1,1,1],
100
+ [1,0,0,0,1],
101
+ [1,0,0,0,1],
102
+ [1,0,0,0,1],
103
+ [1,0,0,0,1]]
104
+
105
+ @characters
106
+ end
107
+ end
108
+
@@ -1,3 +1,3 @@
1
1
  module Graphit
2
- VERSION = "0.0.5"
2
+ VERSION = "0.0.6"
3
3
  end
data/lib/graphit.rb CHANGED
@@ -0,0 +1 @@
1
+ require 'graphit/pixel_font.rb'
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: graphit
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.5
4
+ version: 0.0.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - jeffmcfadden
@@ -72,6 +72,7 @@ files:
72
72
  - graphit.gemspec
73
73
  - graphit/version.rb
74
74
  - lib/graphit.rb
75
+ - lib/graphit/pixel_font.rb
75
76
  - lib/graphit/version.rb
76
77
  - test-01.bmp
77
78
  - test-01.png