texplay 0.2.983pre1-i386-mswin32 → 0.2.983pre2-i386-mswin32

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/CHANGELOG CHANGED
@@ -1,6 +1,12 @@
1
+ *1/10/10
2
+ version 0.2.983pre2
3
+ * added Window#to_texture(...) seems to be broken! releasing pre2 so
4
+ * others can test it :)
5
+
1
6
  *27/9/10
2
7
  version 0.2.983pre1
3
8
  * added Window#to_blob(x,y,width,height), grab a screenshot region
9
+
4
10
  *24/9/10
5
11
  version 0.2.982pre1
6
12
  * added :default drawing mode (equivalent to :mode => nil)
data/README.markdown CHANGED
@@ -5,7 +5,7 @@
5
5
  INSTRUCTIONS
6
6
  ============
7
7
 
8
- **TexPlay version 0.2.983pre1**
8
+ **TexPlay version 0.2.983pre2**
9
9
 
10
10
  [Read The Documentation](http://banisterfiend.wordpress.com/2008/08/23/texplay-an-image-manipulation-tool-for-ruby-and-gosu/)
11
11
 
data/Rakefile CHANGED
@@ -28,8 +28,8 @@ CLOBBER.include("**/*.#{$dlext}", "**/*~", "**/*#*", "**/*.log", "**/*.o")
28
28
 
29
29
  # s.extensions = ["ext/texplay/extconf.rb"]
30
30
  # s.files = ["Rakefile", "README.markdown", "CHANGELOG",
31
- # "lib/texplay.rb", "lib/texplay-contrib.rb", "lib/texplay/version.rb"] +
32
- # FileList["ext/**/extconf.rb", "ext/**/*.h", "ext/**/*.c", "examples/*.rb", "examples/media/*"].to_a
31
+ # "lib/texplay.rb", "lib/texplay-contrib.rb", "lib/texplay/version.rb", "lib/texplay/patches.rb"] +
32
+ # FileList["ext/**/extconf.rb", "ext/**/*.h", "ext/**/*.c", "examples/*.rb", "examples/media/*", "spec/*.rb"].to_a
33
33
  # end
34
34
 
35
35
  # Rake::ExtensionTask.new('texplay', specification) do |ext|
data/examples/common.rb CHANGED
@@ -1,6 +1,5 @@
1
1
  $LOAD_PATH.push(File.dirname(__FILE__) + '/../lib/')
2
2
 
3
- require 'rubygems'
4
3
  require 'texplay'
5
4
 
6
5
  module Common
@@ -1,4 +1,3 @@
1
- require 'rubygems'
2
1
  require 'common'
3
2
  require 'gosu'
4
3
  require 'texplay'
@@ -0,0 +1,55 @@
1
+ require 'common'
2
+ require 'gosu'
3
+ require 'texplay'
4
+
5
+
6
+ class W < Gosu::Window
7
+
8
+ def render_to_texture(image, x, y)
9
+ tex_name = image.gl_tex_info.tex_name
10
+ xoffset = image.gl_tex_info.left * Gosu::MAX_TEXTURE_SIZE * Gosu::MAX_TEXTURE_SIZE
11
+ yoffset = image.gl_tex_info.top * Gosu::MAX_TEXTURE_SIZE
12
+ width = image.width
13
+ height = image.height
14
+
15
+ self.to_texture(tex_name, xoffset, yoffset, x, y, width, height)
16
+ end
17
+
18
+ def initialize
19
+ super(500, 500, false, 20)
20
+ @img = Gosu::Image.new(self, "#{Common::MEDIA}/maria.png")
21
+ @img2 = TexPlay.create_image(self, 100, 100, :color => Gosu::Color::RED)
22
+
23
+ end
24
+
25
+ def update
26
+
27
+ end
28
+
29
+ def draw
30
+ @img.draw 0, 0,1
31
+ @img2.draw rand(100), rand(100),1
32
+ @img3.draw rand(300), rand(300), 1 if @img3
33
+
34
+ if button_down?(Gosu::KbEscape)
35
+ # self.flush
36
+ @img3 = TexPlay.create_image(self, Gosu::MAX_TEXTURE_SIZE - 2, Gosu::MAX_TEXTURE_SIZE - 2, :color => :purple)
37
+
38
+ render_to_texture(@img2, 0, self.height)
39
+
40
+
41
+
42
+ # if @blob
43
+ # @img3 = TexPlay.from_blob(self, @blob,50, 50 )
44
+ # end
45
+ end
46
+
47
+ 500000.times {}
48
+ end
49
+
50
+ end
51
+
52
+
53
+ w = W.new
54
+ w.show
55
+
data/lib/1.8/texplay.so CHANGED
Binary file
data/lib/1.9/texplay.so CHANGED
Binary file
@@ -1,3 +1,3 @@
1
1
  module TexPlay
2
- VERSION = "0.2.983pre1"
2
+ VERSION = "0.2.983pre2"
3
3
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: texplay
3
3
  version: !ruby/object:Gem::Version
4
- hash: -879410554
4
+ hash: 570791623
5
5
  prerelease: true
6
6
  segments:
7
7
  - 0
8
8
  - 2
9
- - 983pre1
10
- version: 0.2.983pre1
9
+ - 983pre2
10
+ version: 0.2.983pre2
11
11
  platform: i386-mswin32
12
12
  authors:
13
13
  - John Mair (banisterfiend)
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2010-09-27 00:00:00 +13:00
18
+ date: 2010-10-01 00:00:00 +13:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency
@@ -91,6 +91,7 @@ files:
91
91
  - examples/example_turtle.rb
92
92
  - examples/example_weird.rb
93
93
  - examples/example_window_to_blob.rb
94
+ - examples/example_window_to_texture.rb
94
95
  - examples/media/bird.png
95
96
  - examples/media/body.png
96
97
  - examples/media/empty2.png
@@ -107,7 +108,7 @@ files:
107
108
  - examples/media/texplay.png
108
109
  - spec/image_spec.rb
109
110
  - spec/texplay_spec.rb
110
- has_rdoc: true
111
+ has_rdoc: false
111
112
  homepage: http://banisterfiend.wordpress.com/2008/08/23/texplay-an-image-manipulation-tool-for-ruby-and-gosu/
112
113
  licenses: []
113
114