gir_ffi-cairo 0.0.10 → 0.0.14
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Changelog.md +67 -0
- data/README.md +1 -1
- data/lib/gir_ffi-cairo/version.rb +5 -0
- data/lib/gir_ffi-cairo.rb +7 -6
- metadata +114 -30
- data/Rakefile +0 -26
- data/test/gir_ffi-cairo/context_test.rb +0 -20
- data/test/gir_ffi-cairo/image_surface_test.rb +0 -16
- data/test/gir_ffi-cairo/pdf_surface_test.rb +0 -29
- data/test/integration/context_test.rb +0 -37
- data/test/test_helper.rb +0 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 72e9a40ff1333ed3e005f7184d9385985f40cb6eebe4955bcd054978ed9fb048
|
4
|
+
data.tar.gz: 1ccf02f668dfc665af9ceae3d373e3b270ce20055a2f7b3aa9881b7690738e71
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b83180cf623cf110d74b0ea078efeae7c5e2ab5d86f4f6d98cfe5df1e323204c375d9a119b06813a212f5d806f9f808b8d91dd822d166b77dfa872d4fa5d1e2a
|
7
|
+
data.tar.gz: 92766c64ac512b0282ec0a931d1397df0536d66ac8c6e1c94eab79264431b2491f67ae2878f5332cc9e3984fad3918d0d3476054d4d61f05020de82af4578395
|
data/Changelog.md
ADDED
@@ -0,0 +1,67 @@
|
|
1
|
+
# Changelog
|
2
|
+
|
3
|
+
## 0.0.14 / 2022-01-21
|
4
|
+
|
5
|
+
* Update dependency on `gir_ffi` to 0.15.2
|
6
|
+
* Drop support for Ruby 2.4 and 2.5
|
7
|
+
* Add support for Ruby 2.7, 3.0 and 3.1
|
8
|
+
|
9
|
+
## 0.0.13 / 2019-10-20
|
10
|
+
|
11
|
+
* Update dependency on `gir_ffi` to 0.15.1
|
12
|
+
* Drop support for Ruby 2.2 and 2.3
|
13
|
+
|
14
|
+
## 0.0.12 / 2018-09-08
|
15
|
+
|
16
|
+
* Drop support for Ruby 2.1
|
17
|
+
* Update dependency on `gir_ffi` to 0.13.0
|
18
|
+
|
19
|
+
## 0.0.11 / 2018-05-22
|
20
|
+
|
21
|
+
* Restore support for Ruby 2.1 and 2.2
|
22
|
+
|
23
|
+
## 0.0.10 / 2018-03-24
|
24
|
+
|
25
|
+
* Update dependency on `gir_ffi` to 0.12.0
|
26
|
+
* Drop support for Ruby versions below 2.3
|
27
|
+
|
28
|
+
## 0.0.9 / 2016-10-16
|
29
|
+
|
30
|
+
* Add overrides for `PDFSurface`
|
31
|
+
* Add drawing methods to `Context`
|
32
|
+
|
33
|
+
## 0.0.8 / 2016-10-16
|
34
|
+
|
35
|
+
* Update dependency on `gir_ffi` to 0.11.0
|
36
|
+
|
37
|
+
## 0.0.7 / 2016-03-23
|
38
|
+
|
39
|
+
* Update dependency on `gir_ffi` to 0.10.0
|
40
|
+
* Update rake dependency
|
41
|
+
|
42
|
+
## 0.0.6 / 2016-01-21
|
43
|
+
|
44
|
+
* Update dependency on `gir_ffi` to 0.9.0
|
45
|
+
|
46
|
+
## 0.0.5 / 2015-09-20
|
47
|
+
|
48
|
+
* Update dependencies
|
49
|
+
|
50
|
+
## 0.0.4 / 2014-01-11
|
51
|
+
|
52
|
+
* Update dependencies
|
53
|
+
* Expand `Cairo::Context` overrides
|
54
|
+
|
55
|
+
## 0.0.3 / 2013-06-08
|
56
|
+
|
57
|
+
* Update dependencies
|
58
|
+
* Update copyright info and licensing formatting
|
59
|
+
|
60
|
+
## 0.0.2 / 2013-01-19
|
61
|
+
|
62
|
+
* Bump dependency versions
|
63
|
+
|
64
|
+
## 0.0.1 / 2012-11-16
|
65
|
+
|
66
|
+
* Initial release
|
67
|
+
* Overrides for `ImageSurface` and `Context`
|
data/README.md
CHANGED
@@ -30,7 +30,7 @@ The following people have contributed to GirFFI-Cairo:
|
|
30
30
|
|
31
31
|
## License
|
32
32
|
|
33
|
-
Copyright © 2012–
|
33
|
+
Copyright © 2012–2018, [Matijs van Zuijlen](http://www.matijs.net/)
|
34
34
|
|
35
35
|
GirFFI-Cairo is free software, distributed under the terms of the GNU Lesser
|
36
36
|
General Public License, version 2.1 or later. See the file COPYING.LIB for more
|
data/lib/gir_ffi-cairo.rb
CHANGED
@@ -1,11 +1,12 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
require
|
3
|
+
require "gir_ffi"
|
4
4
|
|
5
5
|
GirFFI.setup :cairo
|
6
6
|
|
7
|
-
require
|
8
|
-
require
|
9
|
-
require
|
10
|
-
require
|
11
|
-
require
|
7
|
+
require "gir_ffi-cairo/context"
|
8
|
+
require "gir_ffi-cairo/format"
|
9
|
+
require "gir_ffi-cairo/surface"
|
10
|
+
require "gir_ffi-cairo/image_surface"
|
11
|
+
require "gir_ffi-cairo/pdf_surface"
|
12
|
+
require "gir_ffi-cairo/version"
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: gir_ffi-cairo
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.14
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Matijs van Zuijlen
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2022-01-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: gir_ffi
|
@@ -16,90 +16,174 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 0.
|
19
|
+
version: 0.15.2
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: 0.
|
26
|
+
version: 0.15.2
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: minitest
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
31
|
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: '5.
|
33
|
+
version: '5.12'
|
34
34
|
type: :development
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: '5.
|
40
|
+
version: '5.12'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: rake
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
45
|
- - "~>"
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: '
|
47
|
+
version: '13.0'
|
48
48
|
type: :development
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
52
|
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version: '
|
55
|
-
|
54
|
+
version: '13.0'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: rake-manifest
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - "~>"
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: 0.2.0
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - "~>"
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: 0.2.0
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: rubocop
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - "~>"
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: 1.25.0
|
76
|
+
type: :development
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - "~>"
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: 1.25.0
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: rubocop-minitest
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - "~>"
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: 0.17.0
|
90
|
+
type: :development
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - "~>"
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: 0.17.0
|
97
|
+
- !ruby/object:Gem::Dependency
|
98
|
+
name: rubocop-packaging
|
99
|
+
requirement: !ruby/object:Gem::Requirement
|
100
|
+
requirements:
|
101
|
+
- - "~>"
|
102
|
+
- !ruby/object:Gem::Version
|
103
|
+
version: 0.5.0
|
104
|
+
type: :development
|
105
|
+
prerelease: false
|
106
|
+
version_requirements: !ruby/object:Gem::Requirement
|
107
|
+
requirements:
|
108
|
+
- - "~>"
|
109
|
+
- !ruby/object:Gem::Version
|
110
|
+
version: 0.5.0
|
111
|
+
- !ruby/object:Gem::Dependency
|
112
|
+
name: rubocop-performance
|
113
|
+
requirement: !ruby/object:Gem::Requirement
|
114
|
+
requirements:
|
115
|
+
- - "~>"
|
116
|
+
- !ruby/object:Gem::Version
|
117
|
+
version: 1.13.0
|
118
|
+
type: :development
|
119
|
+
prerelease: false
|
120
|
+
version_requirements: !ruby/object:Gem::Requirement
|
121
|
+
requirements:
|
122
|
+
- - "~>"
|
123
|
+
- !ruby/object:Gem::Version
|
124
|
+
version: 1.13.0
|
125
|
+
- !ruby/object:Gem::Dependency
|
126
|
+
name: simplecov
|
127
|
+
requirement: !ruby/object:Gem::Requirement
|
128
|
+
requirements:
|
129
|
+
- - "~>"
|
130
|
+
- !ruby/object:Gem::Version
|
131
|
+
version: 0.21.0
|
132
|
+
type: :development
|
133
|
+
prerelease: false
|
134
|
+
version_requirements: !ruby/object:Gem::Requirement
|
135
|
+
requirements:
|
136
|
+
- - "~>"
|
137
|
+
- !ruby/object:Gem::Version
|
138
|
+
version: 0.21.0
|
139
|
+
description: 'Bindings for Cairo generated by GirFFI, with overrides.
|
140
|
+
|
141
|
+
'
|
56
142
|
email:
|
57
143
|
- matijs@matijs.net
|
58
144
|
executables: []
|
59
145
|
extensions: []
|
60
|
-
extra_rdoc_files:
|
146
|
+
extra_rdoc_files:
|
147
|
+
- Changelog.md
|
148
|
+
- README.md
|
61
149
|
files:
|
62
150
|
- COPYING.LIB
|
151
|
+
- Changelog.md
|
63
152
|
- README.md
|
64
|
-
- Rakefile
|
65
153
|
- lib/gir_ffi-cairo.rb
|
66
154
|
- lib/gir_ffi-cairo/context.rb
|
67
155
|
- lib/gir_ffi-cairo/format.rb
|
68
156
|
- lib/gir_ffi-cairo/image_surface.rb
|
69
157
|
- lib/gir_ffi-cairo/pdf_surface.rb
|
70
158
|
- lib/gir_ffi-cairo/surface.rb
|
71
|
-
-
|
72
|
-
- test/gir_ffi-cairo/image_surface_test.rb
|
73
|
-
- test/gir_ffi-cairo/pdf_surface_test.rb
|
74
|
-
- test/integration/context_test.rb
|
75
|
-
- test/test_helper.rb
|
159
|
+
- lib/gir_ffi-cairo/version.rb
|
76
160
|
homepage: http://www.github.com/mvz/gir_ffi-cairo
|
77
161
|
licenses:
|
78
162
|
- LGPL-2.1
|
79
|
-
metadata:
|
80
|
-
|
81
|
-
|
163
|
+
metadata:
|
164
|
+
homepage_uri: http://www.github.com/mvz/gir_ffi-cairo
|
165
|
+
source_code_uri: https://github.com/mvz/gir_ffi-cairo
|
166
|
+
changelog_uri: https://github.com/mvz/gir_ffi-cairo/blob/master/Changelog.md
|
167
|
+
rubygems_mfa_required: 'true'
|
168
|
+
post_install_message:
|
169
|
+
rdoc_options:
|
170
|
+
- "--main"
|
171
|
+
- README.md
|
82
172
|
require_paths:
|
83
173
|
- lib
|
84
174
|
required_ruby_version: !ruby/object:Gem::Requirement
|
85
175
|
requirements:
|
86
176
|
- - ">="
|
87
177
|
- !ruby/object:Gem::Version
|
88
|
-
version: 2.
|
178
|
+
version: 2.6.0
|
89
179
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
90
180
|
requirements:
|
91
181
|
- - ">="
|
92
182
|
- !ruby/object:Gem::Version
|
93
183
|
version: '0'
|
94
184
|
requirements: []
|
95
|
-
|
96
|
-
|
97
|
-
signing_key:
|
185
|
+
rubygems_version: 3.3.3
|
186
|
+
signing_key:
|
98
187
|
specification_version: 4
|
99
188
|
summary: GirFFI-based bindings for Cairo
|
100
|
-
test_files:
|
101
|
-
- test/test_helper.rb
|
102
|
-
- test/integration/context_test.rb
|
103
|
-
- test/gir_ffi-cairo/pdf_surface_test.rb
|
104
|
-
- test/gir_ffi-cairo/image_surface_test.rb
|
105
|
-
- test/gir_ffi-cairo/context_test.rb
|
189
|
+
test_files: []
|
data/Rakefile
DELETED
@@ -1,26 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
require 'bundler/gem_helper'
|
4
|
-
require 'rake/testtask'
|
5
|
-
|
6
|
-
Bundler::GemHelper.install_tasks
|
7
|
-
|
8
|
-
namespace :test do
|
9
|
-
Rake::TestTask.new(:unit) do |t|
|
10
|
-
t.libs = ['lib']
|
11
|
-
t.test_files = FileList['test/gir_ffi-cairo/*_test.rb']
|
12
|
-
t.warning = true
|
13
|
-
end
|
14
|
-
|
15
|
-
Rake::TestTask.new(:integration) do |t|
|
16
|
-
t.libs = ['lib']
|
17
|
-
t.test_files = FileList['test/integration/*_test.rb']
|
18
|
-
t.warning = true
|
19
|
-
end
|
20
|
-
|
21
|
-
task all: [:unit, :integration]
|
22
|
-
end
|
23
|
-
|
24
|
-
task test: 'test:all'
|
25
|
-
|
26
|
-
task default: 'test'
|
@@ -1,20 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
require File.expand_path('../test_helper.rb', File.dirname(__FILE__))
|
4
|
-
|
5
|
-
describe Cairo::Context do
|
6
|
-
describe '.create' do
|
7
|
-
it 'creates a new Cairo::Context' do
|
8
|
-
obj = Cairo::Context.create(nil)
|
9
|
-
obj.must_be_instance_of Cairo::Context
|
10
|
-
end
|
11
|
-
end
|
12
|
-
|
13
|
-
let(:instance) { Cairo::Context.create(nil) }
|
14
|
-
|
15
|
-
describe '#get_target' do
|
16
|
-
it "returns the context's target" do
|
17
|
-
instance.get_target.must_be_instance_of Cairo::Surface
|
18
|
-
end
|
19
|
-
end
|
20
|
-
end
|
@@ -1,16 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
require File.expand_path('../test_helper.rb', File.dirname(__FILE__))
|
4
|
-
|
5
|
-
describe Cairo::ImageSurface do
|
6
|
-
it 'is a subclass of Cairo::Surface' do
|
7
|
-
Cairo::ImageSurface.superclass.must_equal Cairo::Surface
|
8
|
-
end
|
9
|
-
|
10
|
-
describe '.create' do
|
11
|
-
it 'creates a new Cairo::ImageSurface' do
|
12
|
-
obj = Cairo::ImageSurface.create(:argb32, 300, 200)
|
13
|
-
obj.must_be_instance_of Cairo::ImageSurface
|
14
|
-
end
|
15
|
-
end
|
16
|
-
end
|
@@ -1,29 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
require File.expand_path('../test_helper.rb', File.dirname(__FILE__))
|
4
|
-
|
5
|
-
describe Cairo::PDFSurface do
|
6
|
-
it 'is a subclass of Cairo::Surface' do
|
7
|
-
Cairo::PDFSurface.superclass.must_equal Cairo::Surface
|
8
|
-
end
|
9
|
-
|
10
|
-
describe '.create' do
|
11
|
-
before { @path = 'test.pdf' }
|
12
|
-
after { File.delete(@path) if File.exist? @path }
|
13
|
-
|
14
|
-
it 'creates a new Cairo::PDFSurface' do
|
15
|
-
obj = Cairo::PDFSurface.create(@path, 300, 200)
|
16
|
-
obj.must_be_instance_of Cairo::PDFSurface
|
17
|
-
end
|
18
|
-
|
19
|
-
it 'creates a new Cairo::PDFSurface with block' do
|
20
|
-
called = nil
|
21
|
-
Cairo::PDFSurface.create(@path, 300, 200) do |surface|
|
22
|
-
surface.must_be_instance_of Cairo::PDFSurface
|
23
|
-
called = true
|
24
|
-
end
|
25
|
-
refute_nil called
|
26
|
-
assert File.exist?(@path)
|
27
|
-
end
|
28
|
-
end
|
29
|
-
end
|
@@ -1,37 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
require File.expand_path('../test_helper.rb', File.dirname(__FILE__))
|
4
|
-
|
5
|
-
describe Cairo::Context do
|
6
|
-
it 'can retrieve the surface it was created for' do
|
7
|
-
dst = Cairo::ImageSurface.create(:argb32, 400, 300)
|
8
|
-
ctx = Cairo::Context.create(dst)
|
9
|
-
ctx.get_target.to_ptr.must_equal dst.to_ptr
|
10
|
-
pass
|
11
|
-
end
|
12
|
-
|
13
|
-
it 'can create and fill a path' do
|
14
|
-
dst = Cairo::ImageSurface.create(:argb32, 400, 300)
|
15
|
-
ctx = Cairo::Context.create(dst)
|
16
|
-
ctx.arc(300, 200, 100, 0, 2 * Math::PI)
|
17
|
-
ctx.set_source_rgba(1, 1, 0, 0.5)
|
18
|
-
ctx.fill
|
19
|
-
pass
|
20
|
-
end
|
21
|
-
|
22
|
-
describe 'PDF' do
|
23
|
-
before { @path = 'integration-test.pdf' }
|
24
|
-
after { File.delete(@path) if File.exist? @path }
|
25
|
-
|
26
|
-
it 'can create pdf' do
|
27
|
-
Cairo::PDFSurface.create(@path, 400, 300) do |surface|
|
28
|
-
ctx = Cairo::Context.create(surface)
|
29
|
-
ctx.arc(300, 200, 100, 0, 2 * Math::PI)
|
30
|
-
ctx.set_source_rgba(1, 1, 0, 0.5)
|
31
|
-
ctx.fill
|
32
|
-
ctx.show_page
|
33
|
-
end
|
34
|
-
pass
|
35
|
-
end
|
36
|
-
end
|
37
|
-
end
|