texplay 0.2.983pre2-i386-mswin32 → 0.3.0-i386-mswin32
Sign up to get free protection for your applications and to get access to all the features.
- data/Rakefile +41 -49
- 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/actions.c +1006 -0
- data/ext/texplay/actions.h +60 -0
- data/ext/texplay/bindings.c +1186 -0
- data/ext/texplay/bindings.h +46 -0
- data/ext/texplay/cache.c +118 -0
- data/ext/texplay/cache.h +24 -0
- data/ext/texplay/compat.h +27 -0
- data/ext/texplay/extconf.rb +28 -0
- data/ext/texplay/gen_eval.c +211 -0
- data/ext/texplay/gen_eval.h +20 -0
- data/ext/texplay/graphics_utils.c +1244 -0
- data/ext/texplay/graphics_utils.h +22 -0
- data/ext/texplay/object2module.c +171 -0
- data/ext/texplay/object2module.h +11 -0
- data/ext/texplay/texplay.c +216 -0
- data/ext/texplay/texplay.h +148 -0
- data/ext/texplay/utils.c +887 -0
- data/ext/texplay/utils.h +153 -0
- data/lib/1.8/texplay.so +0 -0
- data/lib/1.9/texplay.so +0 -0
- data/lib/texplay.rb +271 -165
- data/lib/texplay/c_function_docs.rb +189 -0
- data/lib/texplay/version.rb +1 -1
- metadata +33 -21
- data/examples/example_window_to_texture.rb +0 -55
- data/lib/texplay/patches.rb +0 -4
data/Rakefile
CHANGED
@@ -5,45 +5,14 @@ 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
|
-
# 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.platform = Gem::Platform::RUBY
|
26
|
-
# s.homepage = "http://banisterfiend.wordpress.com/2008/08/23/texplay-an-image-manipulation-tool-for-ruby-and-gosu/"
|
27
|
-
# s.has_rdoc = false
|
28
|
-
|
29
|
-
# s.extensions = ["ext/texplay/extconf.rb"]
|
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
|
33
|
-
# end
|
34
|
-
|
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
|
-
|
42
|
-
|
43
|
-
#comment this when want to build normal gems.
|
44
|
-
#only have this code uncommented when building mswin32 and mingw32
|
45
|
-
#binary gems
|
46
|
-
specification = Gem::Specification.new do |s|
|
15
|
+
def apply_spec_defaults(s)
|
47
16
|
s.name = "texplay"
|
48
17
|
s.summary = "TexPlay is a light-weight image manipulation framework for Ruby and Gosu"
|
49
18
|
s.version = TexPlay::VERSION
|
@@ -53,25 +22,48 @@ specification = Gem::Specification.new do |s|
|
|
53
22
|
s.description = s.summary
|
54
23
|
s.require_path = 'lib'
|
55
24
|
s.add_dependency("gosu",">=0.7.20")
|
56
|
-
s.platform = 'i386-mswin32'
|
57
25
|
s.homepage = "http://banisterfiend.wordpress.com/2008/08/23/texplay-an-image-manipulation-tool-for-ruby-and-gosu/"
|
58
|
-
s.has_rdoc =
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
"lib/texplay/version.rb",
|
63
|
-
"lib/texplay/patches.rb",
|
64
|
-
"lib/1.8/texplay.so",
|
65
|
-
"lib/1.9/texplay.so"] +
|
66
|
-
FileList["examples/*.rb", "examples/media/*", "spec/*.rb"].to_a
|
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
|
67
30
|
end
|
68
31
|
|
69
|
-
|
70
|
-
|
71
|
-
|
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
|
40
|
+
|
41
|
+
Rake::GemPackageTask.new(spec) do |pkg|
|
42
|
+
pkg.need_zip = false
|
43
|
+
pkg.need_tar = false
|
44
|
+
end
|
45
|
+
end
|
72
46
|
end
|
73
47
|
|
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
|
54
|
+
|
55
|
+
Rake::GemPackageTask.new(spec) do |pkg|
|
56
|
+
pkg.need_zip = false
|
57
|
+
pkg.need_tar = false
|
58
|
+
end
|
59
|
+
end
|
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
data/examples/example_tiles.rb
CHANGED