texplay 0.2.935-i386-mingw32 → 0.2.940-i386-mingw32

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,3 +1,8 @@
1
+ 9/6/10
2
+ version 0.2.940
3
+ * hopefully fixed :trace behaviour. Should now return nil for color when
4
+ pixel out of bounds.
5
+
1
6
  9/6/10
2
7
  version 0.2.930
3
8
  * not_a_color now returns true when color channel < 0
data/README.markdown CHANGED
@@ -5,7 +5,7 @@
5
5
  INSTRUCTIONS
6
6
  ============
7
7
 
8
- **TexPlay version 0.2.935**
8
+ **TexPlay version 0.2.940**
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
 
@@ -17,24 +17,24 @@ class W < Gosu::Window
17
17
  @s = true
18
18
 
19
19
  @copy = TexPlay.create_image(self, @rad * 2 + 1, @rad * 2 + 1)
20
- @copy2 = TexPlay.create_image(self, @rad * 2 + 1, @rad * 2 + 1)
20
+ @copy2 = TexPlay.create_image(self, @rad * 2 + 1, @rad * 2 + 1)
21
21
  end
22
22
 
23
23
  def draw
24
+ @pause = true
24
25
 
26
+ @x += 1
27
+ @y += 1
25
28
 
26
- @x += 3
27
- @y += 3
28
-
29
- @x2 -= 3
30
- @y2 += 3
29
+ @x2 -= 1
30
+ @y2 += 1
31
31
 
32
32
 
33
33
  @copy2.splice @img, 0, 0, :crop => [@x2 - @rad, @y2 - @rad, @x2 + @rad, @y2 + @rad], :sync_mode => :no_sync
34
34
  @copy.splice @img, 0, 0, :crop => [@x - @rad, @y - @rad, @x + @rad, @y + @rad], :sync_mode => :no_sync
35
- @img.rect @x - @rad, @y - @rad, @x + @rad, @y + @rad, :fill => true, :mode => :overlay, :color => :red
35
+ @img.rect @x - @rad, @y - @rad, @x + @rad, @y + @rad, :fill => true, :mode => :overlay, :color => :tyrian
36
36
 
37
- @img.rect @x2 - @rad, @y2 - @rad, @x2 + @rad, @y2 + @rad, :fill => true, :mode => :overlay, :color => :blue
37
+ @img.rect @x2 - @rad, @y2 - @rad, @x2 + @rad, @y2 + @rad, :fill => true, :mode => :invert, :color => :blue
38
38
 
39
39
  # @img.force_sync [0,0, @img.width, @img.height]
40
40
 
@@ -0,0 +1,25 @@
1
+ require 'rubygems'
2
+ require 'common'
3
+ require 'gosu'
4
+ require 'texplay'
5
+
6
+ class Window < Gosu::Window
7
+ def initialize
8
+ super(500, 500, false, 20)
9
+
10
+ @image = TexPlay.create_image(self, 50, 50)
11
+
12
+ from_x = 50
13
+ from_y = 50
14
+ to_x = 51
15
+ to_y = 51
16
+
17
+ x2, y2, color = @image.line from_x, from_y, to_x, to_y, :trace => { :while_color => :red }
18
+
19
+ p x2
20
+ p y2
21
+ p color
22
+ end
23
+ end
24
+
25
+ Window.new.show
@@ -8,7 +8,7 @@ class W < Gosu::Window
8
8
  super(500, 500, false, 20)
9
9
  @img = TexPlay.create_image(self, 500, 500).fill(3,3, :color => :alpha)
10
10
  @img.rect 100, 100, 300 , 300, :color => :blue, :fill => true
11
- puts (@img.line 400, 200, 100, 200, :trace => { :until_color => :blue }, :color_mode => :gosu)
11
+ puts (@img.line 498, 200, 600, 200, :trace => { :while_color => :blue })
12
12
  end
13
13
 
14
14
  def draw
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.935"
2
+ VERSION = "0.2.940"
3
3
  end
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 2
8
- - 935
9
- version: 0.2.935
8
+ - 940
9
+ version: 0.2.940
10
10
  platform: i386-mingw32
11
11
  authors:
12
12
  - John Mair (banisterfiend)
@@ -64,6 +64,7 @@ files:
64
64
  - examples/example_fluent.rb
65
65
  - examples/example_gen_eval.rb
66
66
  - examples/example_hash_arguments.rb
67
+ - examples/example_ippa.rb
67
68
  - examples/example_light.rb
68
69
  - examples/example_light_multiply.rb
69
70
  - examples/example_lsystem.rb