devil 0.1.6-x86-mswin32-60

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.
Binary file
Binary file
data/test/tank.png ADDED
Binary file
@@ -0,0 +1,25 @@
1
+ direc = File.dirname(__FILE__)
2
+
3
+ $LOAD_PATH.push("#{direc}/../lib/")
4
+
5
+ require 'rubygems'
6
+ require "devil/gosu"
7
+
8
+ img = Devil.load_image("#{direc}/texture.png")
9
+
10
+ img.crop(100,100, 200, 200)
11
+ img_dup = img.dup
12
+
13
+ img.negative
14
+
15
+ img.show(200,200)
16
+ img_dup.show(450, 200)
17
+
18
+
19
+
20
+
21
+
22
+
23
+
24
+
25
+
@@ -0,0 +1,26 @@
1
+ $direc = File.dirname(__FILE__)
2
+
3
+ $LOAD_PATH.push("#{$direc}/../lib/")
4
+
5
+ require 'rubygems'
6
+ require 'gosu'
7
+ require 'devil'
8
+
9
+ class W < Gosu::Window
10
+ def initialize
11
+ super(1024, 768, false, 20)
12
+
13
+ img = Devil.load_image("#{$direc}/texture.jpg")
14
+
15
+ @img = Gosu::Image.new(self, img)
16
+ end
17
+
18
+ def draw
19
+ @img.draw 100, 50,1
20
+ end
21
+
22
+ end
23
+
24
+ w = W.new
25
+ w.show
26
+
@@ -0,0 +1,26 @@
1
+ $direc = File.dirname(__FILE__)
2
+
3
+ $LOAD_PATH.push("#{$direc}/../lib/")
4
+
5
+ require 'rubygems'
6
+ require 'devil/gosu'
7
+
8
+ class W < Gosu::Window
9
+ def initialize
10
+ super(1024, 768, false, 20)
11
+
12
+ @img = Gosu::Image.new(self, "tank.png")
13
+ @img.circle 100, 100, 50, :color => :purple, :filled => true
14
+
15
+ @img.save("tank-modified.png")
16
+ end
17
+
18
+ def draw
19
+ @img.draw 100, 50,1
20
+ end
21
+
22
+ end
23
+
24
+ w = W.new
25
+ w.show
26
+
@@ -0,0 +1,10 @@
1
+ $direc = File.dirname(__FILE__)
2
+
3
+ $LOAD_PATH.push("#{$direc}/../lib/")
4
+
5
+ require 'rubygems'
6
+ require 'devil/gosu'
7
+
8
+ Devil.load_image("texture.png").show(512, 400)
9
+ Devil.load_image("tank.png").show(300, 400)
10
+
@@ -0,0 +1,25 @@
1
+ direc = File.dirname(__FILE__)
2
+
3
+ $LOAD_PATH.push("#{direc}/../lib/")
4
+
5
+ require 'rubygems'
6
+ require "devil"
7
+
8
+ Devil.load_image("#{direc}/texture.png") do |img|
9
+ img.negative
10
+ img.save("#{direc}/texture_neg.png")
11
+ end
12
+
13
+ img = Devil.load_image("#{direc}/texture.png")
14
+ bink = Devil.load_image("#{direc}/texture.png")
15
+
16
+ img.gamma_correct(1.6)
17
+ bink.resize(50, 50)
18
+
19
+ img.save("#{direc}/texture_blur.png")
20
+ bink.save("#{direc}/texture_tiny.png")
21
+
22
+
23
+
24
+
25
+
@@ -0,0 +1,33 @@
1
+ $direc = File.dirname(__FILE__)
2
+
3
+ $LOAD_PATH.push("#{$direc}/../lib/")
4
+
5
+ require 'rubygems'
6
+ require 'devil/gosu'
7
+
8
+ class W < Gosu::Window
9
+ def initialize
10
+ super(1024, 768, false, 20)
11
+
12
+ @img = Gosu::Image.new(self, "tank.png")
13
+ @img2 = @img.dup
14
+ @img.circle 100, 100, 50, :color => :purple, :filled => true
15
+ end
16
+
17
+ def draw
18
+ @img.draw 100, 50,1
19
+ @img.draw 300, 50, 1
20
+ @img2.draw 300, 400, 1
21
+ end
22
+
23
+ def update
24
+ if button_down?(Gosu::KbEscape)
25
+ screenshot.rotate(45).save("screenshot.png")
26
+ exit
27
+ end
28
+ end
29
+ end
30
+
31
+ w = W.new
32
+ w.show
33
+
@@ -0,0 +1,12 @@
1
+ $direc = File.dirname(__FILE__)
2
+
3
+ $LOAD_PATH.push("#{$direc}/../lib/")
4
+
5
+ require 'rubygems'
6
+ require 'devil/gosu'
7
+
8
+ Devil.load("texture.png") do |img|
9
+ img.thumbnail(300)
10
+ img.show
11
+ end
12
+
data/test/texture.jpg ADDED
Binary file
data/test/texture.png ADDED
Binary file
metadata ADDED
@@ -0,0 +1,78 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: devil
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.6
5
+ platform: x86-mswin32-60
6
+ authors:
7
+ - Jaroslaw Tworek, John Mair (banisterfiend)
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+
12
+ date: 2009-10-13 00:00:00 +13:00
13
+ default_executable:
14
+ dependencies: []
15
+
16
+ description: ruby bindings for devil cross platform image loading library
17
+ email: jrmair@gmail.com
18
+ executables: []
19
+
20
+ extensions: []
21
+
22
+ extra_rdoc_files:
23
+ - README
24
+ - lib/devil/gosu.rb
25
+ files:
26
+ - Rakefile
27
+ - README
28
+ - LICENSE
29
+ - lib/devil.rb
30
+ - lib/devil/gosu.rb
31
+ - ext/devil/extconf.rb
32
+ - ext/devil/ruby_devil_ext.h
33
+ - ext/devil/ruby_devil_ext.c
34
+ - ext/devil/ruby_il.c
35
+ - ext/devil/ruby_ilu.c
36
+ - test/test_clone_and_crop.rb
37
+ - test/test_gosu_load.rb
38
+ - test/test_gosu_save.rb
39
+ - test/test_gosu_show.rb
40
+ - test/test_new_api.rb
41
+ - test/test_screenshot.rb
42
+ - test/test_thumbnail.rb
43
+ - test/texture.jpg
44
+ - test/screenshot.png
45
+ - test/tank-modified.png
46
+ - test/tank.png
47
+ - test/texture.png
48
+ - lib/1.8/devil.so
49
+ - lib/1.9/devil.so
50
+ has_rdoc: true
51
+ homepage: http://banisterfiend.wordpress.com
52
+ post_install_message:
53
+ rdoc_options:
54
+ - --main
55
+ - README
56
+ require_paths:
57
+ - lib
58
+ required_ruby_version: !ruby/object:Gem::Requirement
59
+ requirements:
60
+ - - ">="
61
+ - !ruby/object:Gem::Version
62
+ version: "0"
63
+ version:
64
+ required_rubygems_version: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - ">="
67
+ - !ruby/object:Gem::Version
68
+ version: "0"
69
+ version:
70
+ requirements: []
71
+
72
+ rubyforge_project:
73
+ rubygems_version: 1.3.1
74
+ signing_key:
75
+ specification_version: 2
76
+ summary: ruby bindings for devil cross platform image loading library
77
+ test_files: []
78
+