texplay 0.2.970-i386-mswin32 → 0.2.975-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,3 +1,8 @@
1
+ 14/8/10
2
+ version 0.2.975
3
+ * fixed :tolerance bug (was in special_cmp_color_with_tolerance, was checking color1.alpha <= tolerance instead of color2.alpha <= tolerance)
4
+ * modified TexPlay.create_image() so it only draws a colored, filled rect if a :color parameter is specified
5
+
1
6
  14/8/10
2
7
  version 0.2.970
3
8
  * fixed :transparent bug (bug was in rb_convert_rb_color_to_rgba(), :transparent was being matched as
data/README.markdown CHANGED
@@ -5,7 +5,7 @@
5
5
  INSTRUCTIONS
6
6
  ============
7
7
 
8
- **TexPlay version 0.2.970**
8
+ **TexPlay version 0.2.975**
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
 
@@ -0,0 +1,22 @@
1
+ require 'rubygems'
2
+ require 'common'
3
+ require 'gosu'
4
+ require 'texplay'
5
+
6
+ class W < Gosu::Window
7
+ def initialize
8
+ super(400, 300, false, 20)
9
+ @img = Gosu::Image.new(self, "#{Common::MEDIA}/object.png")
10
+
11
+ @img.rect 0, 0, 200, 100, :color => :green, :fill => true, :dest_select => :transparent, :tolerance => 0.5
12
+ end
13
+
14
+ def draw
15
+ @img.draw 100, 100, 1
16
+ end
17
+
18
+ end
19
+
20
+
21
+ w = W.new
22
+ w.show
Binary file
data/lib/1.8/texplay.so CHANGED
Binary file
data/lib/1.9/texplay.so CHANGED
Binary file
data/lib/texplay.rb CHANGED
@@ -31,10 +31,9 @@ module TexPlay
31
31
  end
32
32
 
33
33
  def create_blank_image(window, width, height, options={})
34
- options = { :color => [0, 0, 0, 0] }.merge!(options)
35
34
 
36
35
  img = Gosu::Image.new(window, EmptyImageStub.new(width, height))
37
- img.rect 0, 0, img.width - 1, img.height - 1, :color => options[:color], :fill => true
36
+ img.rect 0, 0, img.width - 1, img.height - 1, :color => options[:color], :fill => true if options[:color]
38
37
 
39
38
  img
40
39
  end
@@ -1,3 +1,3 @@
1
1
  module TexPlay
2
- VERSION = "0.2.970"
2
+ VERSION = "0.2.975"
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: 1923
4
+ hash: 1929
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 2
9
- - 970
10
- version: 0.2.970
9
+ - 975
10
+ version: 0.2.975
11
11
  platform: i386-mswin32
12
12
  authors:
13
13
  - John Mair (banisterfiend)
@@ -83,6 +83,7 @@ files:
83
83
  - examples/example_trace.rb
84
84
  - examples/example_transparent.rb
85
85
  - examples/example_transparent2.rb
86
+ - examples/example_transparent3.rb
86
87
  - examples/example_turtle.rb
87
88
  - examples/example_weird.rb
88
89
  - examples/media/bird.png
@@ -92,6 +93,7 @@ files:
92
93
  - examples/media/green.png
93
94
  - examples/media/logo.png
94
95
  - examples/media/maria.png
96
+ - examples/media/object.png
95
97
  - examples/media/rose.bmp
96
98
  - examples/media/sand1.png
97
99
  - examples/media/sunset.png