texplay 0.2.983pre2 → 0.3.0
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/Rakefile +48 -56
- data/examples/common.rb +13 -2
- data/examples/example_alpha_blend.rb +1 -3
- data/examples/example_bezier.rb +1 -2
- data/examples/example_blank.rb +1 -3
- data/examples/example_cache.rb +1 -3
- data/examples/example_color_transform.rb +1 -3
- data/examples/example_color_transform_circle.rb +1 -3
- data/examples/example_darken.rb +1 -4
- data/examples/example_dup.rb +1 -4
- data/examples/example_each.rb +1 -4
- data/examples/example_effect.rb +1 -2
- data/examples/example_fill.rb +1 -2
- data/examples/example_fill_old.rb +1 -2
- data/examples/example_fluent.rb +1 -3
- data/examples/example_font.rb +1 -3
- data/examples/example_gen_eval.rb +1 -2
- data/examples/example_hash_arguments.rb +1 -2
- data/examples/example_ippa.rb +1 -3
- data/examples/example_light.rb +1 -3
- data/examples/example_light_multiply.rb +1 -3
- data/examples/example_lsystem.rb +1 -1
- data/examples/example_melt.rb +1 -3
- data/examples/example_meyet.rb +1 -3
- data/examples/example_polyline.rb +1 -2
- data/examples/example_scale.rb +1 -3
- data/examples/example_select.rb +1 -3
- data/examples/example_select2.rb +1 -4
- data/examples/example_simple.rb +1 -3
- data/examples/example_splice.rb +2 -4
- data/examples/example_sync.rb +1 -2
- data/examples/example_tiles.rb +1 -3
- data/examples/example_trace.rb +1 -2
- data/examples/example_transparent.rb +1 -3
- data/examples/example_transparent2.rb +1 -3
- data/examples/example_transparent3.rb +1 -3
- data/examples/example_turtle.rb +1 -2
- data/examples/example_weird.rb +1 -2
- data/examples/example_window_render_to_image.rb +41 -0
- data/examples/example_window_to_blob.rb +2 -5
- data/ext/texplay/utils.c +0 -5
- data/lib/texplay.rb +271 -165
- data/lib/texplay/c_function_docs.rb +189 -0
- data/lib/texplay/version.rb +1 -1
- metadata +13 -19
- data/examples/example_window_to_texture.rb +0 -55
- data/lib/texplay/patches.rb +0 -4
data/Rakefile
CHANGED
|
@@ -5,73 +5,65 @@ require 'rake/gempackagetask'
|
|
|
5
5
|
#require 'rake/extensiontask'
|
|
6
6
|
|
|
7
7
|
# get the texplay version
|
|
8
|
-
require 'lib/texplay/version'
|
|
8
|
+
require './lib/texplay/version'
|
|
9
9
|
|
|
10
|
-
|
|
10
|
+
dlext = Config::CONFIG['DLEXT']
|
|
11
11
|
|
|
12
|
-
CLEAN.include("ext/**/*.#{
|
|
13
|
-
CLOBBER.include("**/*.#{
|
|
12
|
+
CLEAN.include("ext/**/*.#{dlext}", "ext/**/*.log", "ext/**/*.o", "ext/**/*~", "ext/**/*#*", "ext/**/*.obj", "ext/**/*.def", "ext/**/*.pdb")
|
|
13
|
+
CLOBBER.include("**/*.#{dlext}", "**/*~", "**/*#*", "**/*.log", "**/*.o")
|
|
14
14
|
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
s.files = ["Rakefile", "README.markdown", "CHANGELOG",
|
|
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
|
|
15
|
+
def apply_spec_defaults(s)
|
|
16
|
+
s.name = "texplay"
|
|
17
|
+
s.summary = "TexPlay is a light-weight image manipulation framework for Ruby and Gosu"
|
|
18
|
+
s.version = TexPlay::VERSION
|
|
19
|
+
s.date = Time.now.strftime '%Y-%m-%d'
|
|
20
|
+
s.author = "John Mair (banisterfiend)"
|
|
21
|
+
s.email = 'jrmair@gmail.com'
|
|
22
|
+
s.description = s.summary
|
|
23
|
+
s.require_path = 'lib'
|
|
24
|
+
s.add_dependency("gosu",">=0.7.20")
|
|
25
|
+
s.homepage = "http://banisterfiend.wordpress.com/2008/08/23/texplay-an-image-manipulation-tool-for-ruby-and-gosu/"
|
|
26
|
+
s.has_rdoc = 'yard'
|
|
27
|
+
s.files = FileList["Rakefile", "README.markdown", "CHANGELOG",
|
|
28
|
+
"lib/**/*.rb", "ext/**/extconf.rb", "ext/**/*.h", "ext/**/*.c",
|
|
29
|
+
"examples/*.rb", "examples/media/*", "spec/*.rb"].to_a
|
|
33
30
|
end
|
|
34
31
|
|
|
35
|
-
# Rake::ExtensionTask.new('texplay', specification) do |ext|
|
|
36
|
-
# ext.config_script = 'extconf.rb'
|
|
37
|
-
# ext.cross_compile = true
|
|
38
|
-
# ext.cross_platform = 'i386-mswin32'
|
|
39
|
-
# ext.platform = 'i386-mswin32'
|
|
40
|
-
# end
|
|
41
32
|
|
|
33
|
+
[:mingw32, :mswin32].each do |v|
|
|
34
|
+
namespace v do
|
|
35
|
+
spec = Gem::Specification.new do |s|
|
|
36
|
+
apply_spec_defaults(s)
|
|
37
|
+
s.platform = "i386-#{v}"
|
|
38
|
+
s.files += FileList["lib/**/*.#{dlext}"].to_a
|
|
39
|
+
end
|
|
42
40
|
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
# s.version = TexPlay::VERSION
|
|
50
|
-
# s.date = Time.now.strftime '%Y-%m-%d'
|
|
51
|
-
# s.author = "John Mair (banisterfiend)"
|
|
52
|
-
# s.email = 'jrmair@gmail.com'
|
|
53
|
-
# s.description = s.summary
|
|
54
|
-
# s.require_path = 'lib'
|
|
55
|
-
# s.add_dependency("gosu",">=0.7.20")
|
|
56
|
-
# s.platform = 'i386-mingw32'
|
|
57
|
-
# s.homepage = "http://banisterfiend.wordpress.com/2008/08/23/texplay-an-image-manipulation-tool-for-ruby-and-gosu/"
|
|
58
|
-
# s.has_rdoc = false
|
|
41
|
+
Rake::GemPackageTask.new(spec) do |pkg|
|
|
42
|
+
pkg.need_zip = false
|
|
43
|
+
pkg.need_tar = false
|
|
44
|
+
end
|
|
45
|
+
end
|
|
46
|
+
end
|
|
59
47
|
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
# FileList["examples/*.rb", "examples/media/*", "spec/*.rb"].to_a
|
|
67
|
-
# end
|
|
48
|
+
namespace :ruby do
|
|
49
|
+
spec = Gem::Specification.new do |s|
|
|
50
|
+
apply_spec_defaults(s)
|
|
51
|
+
s.platform = Gem::Platform::RUBY
|
|
52
|
+
s.extensions = ["ext/texplay/extconf.rb"]
|
|
53
|
+
end
|
|
68
54
|
|
|
69
|
-
Rake::GemPackageTask.new(
|
|
70
|
-
|
|
71
|
-
|
|
55
|
+
Rake::GemPackageTask.new(spec) do |pkg|
|
|
56
|
+
pkg.need_zip = false
|
|
57
|
+
pkg.need_tar = false
|
|
58
|
+
end
|
|
72
59
|
end
|
|
73
|
-
|
|
60
|
+
|
|
74
61
|
desc "Run rspec 2.0"
|
|
75
62
|
task :rspec do
|
|
76
63
|
system "rspec spec/**/*_spec.rb"
|
|
77
64
|
end
|
|
65
|
+
|
|
66
|
+
desc "Create yard docs"
|
|
67
|
+
task :doc do
|
|
68
|
+
system "yard doc lib --output doc/yard --files doc/texplay_manual"
|
|
69
|
+
end
|
data/examples/common.rb
CHANGED
|
@@ -1,7 +1,18 @@
|
|
|
1
|
-
|
|
1
|
+
EXAMPLES_DIR = File.dirname(File.expand_path(__FILE__))
|
|
2
2
|
|
|
3
|
+
# Ensure that the texplay loaded is the one in this repository, not any gem installed.
|
|
4
|
+
$LOAD_PATH.unshift File.expand_path(File.join(EXAMPLES_DIR, '..', 'lib'))
|
|
5
|
+
|
|
6
|
+
begin
|
|
7
|
+
require 'rubygems'
|
|
8
|
+
rescue LoadError => ex
|
|
9
|
+
end
|
|
10
|
+
|
|
11
|
+
require 'gosu'
|
|
3
12
|
require 'texplay'
|
|
4
13
|
|
|
5
14
|
module Common
|
|
6
|
-
MEDIA = File.
|
|
15
|
+
MEDIA = File.join(EXAMPLES_DIR, 'media')
|
|
7
16
|
end
|
|
17
|
+
|
|
18
|
+
|
data/examples/example_bezier.rb
CHANGED
data/examples/example_blank.rb
CHANGED
data/examples/example_cache.rb
CHANGED
data/examples/example_darken.rb
CHANGED
data/examples/example_dup.rb
CHANGED
data/examples/example_each.rb
CHANGED
data/examples/example_effect.rb
CHANGED
data/examples/example_fill.rb
CHANGED
data/examples/example_fluent.rb
CHANGED
data/examples/example_font.rb
CHANGED
data/examples/example_ippa.rb
CHANGED
data/examples/example_light.rb
CHANGED
data/examples/example_lsystem.rb
CHANGED
data/examples/example_melt.rb
CHANGED
data/examples/example_meyet.rb
CHANGED
data/examples/example_scale.rb
CHANGED
data/examples/example_select.rb
CHANGED
data/examples/example_select2.rb
CHANGED
data/examples/example_simple.rb
CHANGED
data/examples/example_splice.rb
CHANGED
data/examples/example_sync.rb
CHANGED