gdk_pixbuf2 0.90.2
Sign up to get free protection for your applications and to get access to all the features.
- data/ChangeLog +430 -0
- data/README +29 -0
- data/Rakefile +74 -0
- data/ext/gdk_pixbuf2/depend +3 -0
- data/ext/gdk_pixbuf2/extconf.rb +61 -0
- data/ext/gdk_pixbuf2/gdk_pixbuf2.def +2 -0
- data/ext/gdk_pixbuf2/rbgdk-pixbuf-format.c +182 -0
- data/ext/gdk_pixbuf2/rbgdk-pixbuf-loader.c +164 -0
- data/ext/gdk_pixbuf2/rbgdk-pixbuf.c +794 -0
- data/ext/gdk_pixbuf2/rbgdk-pixbuf.h +34 -0
- data/ext/gdk_pixbuf2/rbgdk-pixbufanimation.c +144 -0
- data/ext/gdk_pixbuf2/rbgdk-pixbufsimpleanim.c +43 -0
- data/ext/gdk_pixbuf2/rbgdk-pixdata.c +221 -0
- data/extconf.rb +49 -0
- data/lib/gdk_pixbuf2.rb +42 -0
- data/sample/anim.rb +38 -0
- data/sample/composite.rb +45 -0
- data/sample/flip.rb +47 -0
- data/sample/floppybuddy.gif +0 -0
- data/sample/format.rb +39 -0
- data/sample/gnome-foot.png +0 -0
- data/sample/inline.rb +37 -0
- data/sample/loader.rb +20 -0
- data/sample/pixdata.rb +39 -0
- data/sample/rotate.rb +45 -0
- data/sample/save.rb +25 -0
- data/sample/scale.rb +45 -0
- data/sample/simpleanim.rb +34 -0
- data/sample/utils.rb +44 -0
- data/sample/xpm.rb +40 -0
- metadata +127 -0
data/sample/utils.rb
ADDED
@@ -0,0 +1,44 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
=begin
|
3
|
+
utils.rb - Ruby/GdkPixbuf sample script.
|
4
|
+
|
5
|
+
Copyright (c) 2002-2006 Ruby-GNOME2 Project Team
|
6
|
+
This program is licenced under the same licence as Ruby-GNOME2.
|
7
|
+
|
8
|
+
$Id: utils.rb,v 1.4 2006/06/17 14:38:08 mutoh Exp $
|
9
|
+
=end
|
10
|
+
|
11
|
+
require 'gtk2'
|
12
|
+
|
13
|
+
filename = ARGV[0]
|
14
|
+
unless filename
|
15
|
+
puts "ruby #{$0} filename"
|
16
|
+
exit(1)
|
17
|
+
end
|
18
|
+
|
19
|
+
src = Gdk::Pixbuf.new(filename)
|
20
|
+
|
21
|
+
vbox = Gtk::VBox.new
|
22
|
+
|
23
|
+
dst = src.add_alpha(true, 0, 0, 0)
|
24
|
+
vbox.pack_start(Gtk::Image.new(dst))
|
25
|
+
|
26
|
+
dst = Gdk::Pixbuf.new(Gdk::Pixbuf::COLORSPACE_RGB, true, 8,
|
27
|
+
src.width + 20, src.height + 30)
|
28
|
+
src.copy_area(0, 0, src.width / 2, src.height / 2, dst, 10, 20)
|
29
|
+
vbox.pack_start(Gtk::Image.new(dst))
|
30
|
+
|
31
|
+
dst = src.saturate_and_pixelate(0.3, true)
|
32
|
+
vbox.pack_start(Gtk::Image.new(dst))
|
33
|
+
|
34
|
+
dst = src.fill!(0xff000099) #RGBA
|
35
|
+
vbox.pack_start(Gtk::Image.new(dst))
|
36
|
+
|
37
|
+
w = Gtk::Window.new.add(vbox)
|
38
|
+
w.signal_connect('delete-event') do
|
39
|
+
Gtk.main_quit
|
40
|
+
end
|
41
|
+
|
42
|
+
w.show_all
|
43
|
+
|
44
|
+
Gtk.main
|
data/sample/xpm.rb
ADDED
@@ -0,0 +1,40 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
=begin
|
3
|
+
xpm.rb - Ruby/GdkPixbuf sample script.
|
4
|
+
|
5
|
+
Copyright (c) 2002-2006 Ruby-GNOME2 Project Team
|
6
|
+
This program is licenced under the same licence as Ruby-GNOME2.
|
7
|
+
|
8
|
+
$Id: xpm.rb,v 1.5 2006/06/17 14:38:08 mutoh Exp $
|
9
|
+
=end
|
10
|
+
|
11
|
+
require 'gtk2'
|
12
|
+
|
13
|
+
r_xpm = [
|
14
|
+
"10 10 3 1",
|
15
|
+
" c None",
|
16
|
+
". c #FE0B0B",
|
17
|
+
"+ c #FFFFFF",
|
18
|
+
"+.......++",
|
19
|
+
"+.. ..+",
|
20
|
+
"+.. ..+",
|
21
|
+
"+.. ...+",
|
22
|
+
"+.......++",
|
23
|
+
"+.....++++",
|
24
|
+
"+..++..+++",
|
25
|
+
"+..++...++",
|
26
|
+
"+..+++...+",
|
27
|
+
"+..++++..+"]
|
28
|
+
|
29
|
+
w = Gtk::Window.new
|
30
|
+
w.signal_connect('delete-event') do
|
31
|
+
Gtk.main_quit
|
32
|
+
end
|
33
|
+
|
34
|
+
src = Gdk::Pixbuf.new(r_xpm)
|
35
|
+
dst = src.scale(300, 300, Gdk::Pixbuf::INTERP_HYPER)
|
36
|
+
|
37
|
+
w.add(Gtk::Image.new(dst))
|
38
|
+
w.show_all
|
39
|
+
|
40
|
+
Gtk.main
|
metadata
ADDED
@@ -0,0 +1,127 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: gdk_pixbuf2
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
hash: 371
|
5
|
+
prerelease: false
|
6
|
+
segments:
|
7
|
+
- 0
|
8
|
+
- 90
|
9
|
+
- 2
|
10
|
+
version: 0.90.2
|
11
|
+
platform: ruby
|
12
|
+
authors:
|
13
|
+
- The Ruby-GNOME2 Proejct Team
|
14
|
+
autorequire:
|
15
|
+
bindir: bin
|
16
|
+
cert_chain: []
|
17
|
+
|
18
|
+
date: 2010-09-25 00:00:00 +09:00
|
19
|
+
default_executable:
|
20
|
+
dependencies:
|
21
|
+
- !ruby/object:Gem::Dependency
|
22
|
+
name: cairo
|
23
|
+
prerelease: false
|
24
|
+
requirement: &id001 !ruby/object:Gem::Requirement
|
25
|
+
none: false
|
26
|
+
requirements:
|
27
|
+
- - ">="
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
hash: 63
|
30
|
+
segments:
|
31
|
+
- 1
|
32
|
+
- 10
|
33
|
+
- 0
|
34
|
+
version: 1.10.0
|
35
|
+
type: :runtime
|
36
|
+
version_requirements: *id001
|
37
|
+
- !ruby/object:Gem::Dependency
|
38
|
+
name: glib2
|
39
|
+
prerelease: false
|
40
|
+
requirement: &id002 !ruby/object:Gem::Requirement
|
41
|
+
none: false
|
42
|
+
requirements:
|
43
|
+
- - "="
|
44
|
+
- !ruby/object:Gem::Version
|
45
|
+
hash: 371
|
46
|
+
segments:
|
47
|
+
- 0
|
48
|
+
- 90
|
49
|
+
- 2
|
50
|
+
version: 0.90.2
|
51
|
+
type: :runtime
|
52
|
+
version_requirements: *id002
|
53
|
+
description: Ruby/GdkPixbuf2 is a Ruby binding of GdkPixbuf-2.x.
|
54
|
+
email: ruby-gnome2-devel-en@lists.sourceforge.net
|
55
|
+
executables: []
|
56
|
+
|
57
|
+
extensions:
|
58
|
+
- ext/gdk_pixbuf2/extconf.rb
|
59
|
+
extra_rdoc_files: []
|
60
|
+
|
61
|
+
files:
|
62
|
+
- ChangeLog
|
63
|
+
- README
|
64
|
+
- Rakefile
|
65
|
+
- extconf.rb
|
66
|
+
- lib/gdk_pixbuf2.rb
|
67
|
+
- ext/gdk_pixbuf2/gdk_pixbuf2.def
|
68
|
+
- ext/gdk_pixbuf2/extconf.rb
|
69
|
+
- ext/gdk_pixbuf2/rbgdk-pixbufsimpleanim.c
|
70
|
+
- ext/gdk_pixbuf2/rbgdk-pixbuf.h
|
71
|
+
- ext/gdk_pixbuf2/rbgdk-pixbuf-loader.c
|
72
|
+
- ext/gdk_pixbuf2/rbgdk-pixbufanimation.c
|
73
|
+
- ext/gdk_pixbuf2/rbgdk-pixbuf-format.c
|
74
|
+
- ext/gdk_pixbuf2/depend
|
75
|
+
- ext/gdk_pixbuf2/rbgdk-pixdata.c
|
76
|
+
- ext/gdk_pixbuf2/rbgdk-pixbuf.c
|
77
|
+
- sample/save.rb
|
78
|
+
- sample/simpleanim.rb
|
79
|
+
- sample/utils.rb
|
80
|
+
- sample/rotate.rb
|
81
|
+
- sample/pixdata.rb
|
82
|
+
- sample/flip.rb
|
83
|
+
- sample/loader.rb
|
84
|
+
- sample/anim.rb
|
85
|
+
- sample/floppybuddy.gif
|
86
|
+
- sample/scale.rb
|
87
|
+
- sample/format.rb
|
88
|
+
- sample/inline.rb
|
89
|
+
- sample/gnome-foot.png
|
90
|
+
- sample/xpm.rb
|
91
|
+
- sample/composite.rb
|
92
|
+
has_rdoc: true
|
93
|
+
homepage: http://ruby-gnome2.sourceforge.jp/
|
94
|
+
licenses: []
|
95
|
+
|
96
|
+
post_install_message:
|
97
|
+
rdoc_options: []
|
98
|
+
|
99
|
+
require_paths:
|
100
|
+
- lib
|
101
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
102
|
+
none: false
|
103
|
+
requirements:
|
104
|
+
- - ">="
|
105
|
+
- !ruby/object:Gem::Version
|
106
|
+
hash: 3
|
107
|
+
segments:
|
108
|
+
- 0
|
109
|
+
version: "0"
|
110
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
111
|
+
none: false
|
112
|
+
requirements:
|
113
|
+
- - ">="
|
114
|
+
- !ruby/object:Gem::Version
|
115
|
+
hash: 3
|
116
|
+
segments:
|
117
|
+
- 0
|
118
|
+
version: "0"
|
119
|
+
requirements: []
|
120
|
+
|
121
|
+
rubyforge_project:
|
122
|
+
rubygems_version: 1.3.7
|
123
|
+
signing_key:
|
124
|
+
specification_version: 3
|
125
|
+
summary: Ruby/GdkPixbuf2 is a Ruby binding of GdkPixbuf-2.x.
|
126
|
+
test_files: []
|
127
|
+
|