indie-raster 0.0.6 → 0.0.7

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.
data/test/test.rb ADDED
@@ -0,0 +1,35 @@
1
+
2
+ require 'indie-raster'
3
+
4
+
5
+ ZEBRA_IMAGE = 2
6
+ FONT = 3
7
+
8
+ def draw()
9
+
10
+ s = IndieRasterSession.new
11
+
12
+ s.createBlank :w => 576, :h => 200
13
+
14
+ s.loadImage :id => ZEBRA_IMAGE, :path => "zebra.pbm"
15
+ s.drawImage :id => ZEBRA_IMAGE, :x => 10, :y => 5
16
+
17
+ s.loadFont :id => FONT, :path => "../fonts/fonts_prf1/dsm-22.prf1"
18
+ s.drawText :x => 50, :y => 55, :font => FONT, :text => "HAI"
19
+
20
+ s.drawUPC(
21
+ :x => 20, :y => 100, :digits => "123456123456",
22
+ :w => (95 * 3), :h => 15, :guard_bar_extra_h => 7)
23
+
24
+ return s
25
+ end
26
+
27
+ p4 = draw().exportP4()
28
+ p6 = draw().exportP6()
29
+
30
+ if (p4 == File.read("expected.pbm")) and (p6 == File.read("expected.ppm"))
31
+ puts "OK"
32
+ else
33
+ puts "FAIL"
34
+ exit 1
35
+ end
data/test/zebra.pbm ADDED
Binary file
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: indie-raster
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.0.6
5
+ version: 0.0.7
6
6
  platform: ruby
7
7
  authors:
8
8
  - ShopKeep
@@ -10,7 +10,7 @@ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
12
 
13
- date: 2011-04-15 00:00:00 Z
13
+ date: 2011-04-25 00:00:00 Z
14
14
  dependencies: []
15
15
 
16
16
  description: A small raster graphics library with pixel fonts and no dependencies.
@@ -68,6 +68,10 @@ files:
68
68
  - src-c/upc.c
69
69
  - src-c/upc.h
70
70
  - src-ruby/indie-raster.rb
71
+ - test/expected.pbm
72
+ - test/expected.ppm
73
+ - test/test.rb
74
+ - test/zebra.pbm
71
75
  homepage: http://github.com/shopkeep/indie-raster
72
76
  licenses: []
73
77