cairo 1.14.3 → 1.14.6
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of cairo might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/NEWS +11 -0
- data/Rakefile +11 -9
- data/ext/cairo/rb_cairo.h +2 -2
- data/ext/cairo/rb_cairo_font_options.c +5 -1
- data/ext/cairo/rb_cairo_surface.c +28 -5
- data/test/test_font_options.rb +47 -2
- metadata +20 -21
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e6a841e03b059ec2f53d5f5d639f799b01fc3f97
|
4
|
+
data.tar.gz: f2286b521dc84d2fc6b4d95f19101292233bde2f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ebcbdc4695496430894c1cdd42c166092ea8b7df68b15aaa5bf9b9c804985442f75a10fdd5461904c45c7f80ff315ed127c9a65941e7503c0903215d833edb6f
|
7
|
+
data.tar.gz: 2f0b4693cf680b3773edd545d2168d40f6a0c380b71ceebef86e9a9e7fb4b42ebc29440c1a4787b57c897cd659924b75e033e8d856e8574a3898b7af37b0c27d
|
data/NEWS
CHANGED
@@ -1,3 +1,14 @@
|
|
1
|
+
Release 1.15.2 (2016-04-02) Kouhei Sutou <kou@cozmixng.org>
|
2
|
+
===========================================================
|
3
|
+
|
4
|
+
Improvements
|
5
|
+
------------
|
6
|
+
|
7
|
+
* Supported cairo 1.15.2.
|
8
|
+
* Cairo::Win32Surface.new(hdc, format): Added.
|
9
|
+
* Dropped Ruby 2.0 support.
|
10
|
+
* Windows: Supported Ruby 2.3.
|
11
|
+
|
1
12
|
Release 1.14.3 (2015-09-08) Kouhei Sutou <kou@cozmixng.org>
|
2
13
|
===========================================================
|
3
14
|
|
data/Rakefile
CHANGED
@@ -116,7 +116,9 @@ class Package < Struct.new(:name,
|
|
116
116
|
def download_site_base_url
|
117
117
|
case download_site
|
118
118
|
when :cairo
|
119
|
-
base_url = "
|
119
|
+
base_url = "https://cairographics.org/releases"
|
120
|
+
when :cairo_snapshots
|
121
|
+
base_url = "https://cairographics.org/snapshots"
|
120
122
|
when :gnome
|
121
123
|
base_url = "http://ftp.gnome.org/pub/gnome/sources"
|
122
124
|
release_series = version.gsub(/\A(\d+\.\d+).+\z/, '\1')
|
@@ -441,7 +443,7 @@ windows_task = WindowsTask.new(spec) do |task|
|
|
441
443
|
{
|
442
444
|
:name => "zlib",
|
443
445
|
:version => "1.2.8",
|
444
|
-
:download_base_url => "http://sourceforge.net/
|
446
|
+
:download_base_url => "http://downloads.sourceforge.net/project/libpng/zlib/1.2.8",
|
445
447
|
:compression_method => "gz",
|
446
448
|
:windows => {
|
447
449
|
:builder => ZlibBuilder.new,
|
@@ -450,16 +452,16 @@ windows_task = WindowsTask.new(spec) do |task|
|
|
450
452
|
},
|
451
453
|
{
|
452
454
|
:name => "libpng",
|
453
|
-
:version => "1.6.
|
454
|
-
:download_base_url => "http://sourceforge.net/
|
455
|
+
:version => "1.6.23",
|
456
|
+
:download_base_url => "http://downloads.sourceforge.net/project/libpng/libpng16/1.6.23",
|
455
457
|
:windows => {
|
456
458
|
:built_file => "bin/libpng16-16.dll",
|
457
459
|
},
|
458
460
|
},
|
459
461
|
{
|
460
462
|
:name => "freetype",
|
461
|
-
:version => "2.6",
|
462
|
-
:download_base_url => "http://sourceforge.net/
|
463
|
+
:version => "2.6.3",
|
464
|
+
:download_base_url => "http://downloads.sourceforge.net/project/freetype/freetype2/2.6.3",
|
463
465
|
:compression_method => "bz2",
|
464
466
|
:windows => {
|
465
467
|
:built_file => "bin/libfreetype-6.dll",
|
@@ -484,7 +486,7 @@ windows_task = WindowsTask.new(spec) do |task|
|
|
484
486
|
{
|
485
487
|
:name => "fontconfig",
|
486
488
|
:version => "2.11.1",
|
487
|
-
:download_base_url => "
|
489
|
+
:download_base_url => "https://www.freedesktop.org/software/fontconfig/release",
|
488
490
|
:compression_method => "bz2",
|
489
491
|
:windows => {
|
490
492
|
:built_file => "bin/libfontconfig-1.dll",
|
@@ -509,7 +511,7 @@ windows_task = WindowsTask.new(spec) do |task|
|
|
509
511
|
},
|
510
512
|
{
|
511
513
|
:name => "cairo",
|
512
|
-
:version => "1.14.
|
514
|
+
:version => "1.14.6",
|
513
515
|
:download_site => :cairo,
|
514
516
|
:windows => {
|
515
517
|
:built_file => "bin/libcairo-2.dll",
|
@@ -534,7 +536,7 @@ namespace :vm do
|
|
534
536
|
architectures.each do |architecture|
|
535
537
|
desc "Build all packages for Windows #{architecture}"
|
536
538
|
task_name = "win#{architecture}"
|
537
|
-
build_tasks << task_name
|
539
|
+
build_tasks << "vm:windows:build:#{task_name}"
|
538
540
|
task task_name do
|
539
541
|
cd("build") do
|
540
542
|
sh("vagrant", "destroy", "--force", task_name)
|
data/ext/cairo/rb_cairo.h
CHANGED
@@ -5,7 +5,7 @@
|
|
5
5
|
* $Author: kou $
|
6
6
|
* $Date: 2008-09-19 12:56:27 $
|
7
7
|
*
|
8
|
-
* Copyright 2006-
|
8
|
+
* Copyright 2006-2016 Kouhei Sutou <kou@cozmixng.org>
|
9
9
|
* Copyright 2005 Øyvind Kolås <pippin@freedesktop.org>
|
10
10
|
* Copyright 2004-2005 MenTaLguY <mental@rydia.com>
|
11
11
|
*
|
@@ -73,7 +73,7 @@ RB_CAIRO_BEGIN_DECLS
|
|
73
73
|
|
74
74
|
#define RB_CAIRO_VERSION_MAJOR 1
|
75
75
|
#define RB_CAIRO_VERSION_MINOR 14
|
76
|
-
#define RB_CAIRO_VERSION_MICRO
|
76
|
+
#define RB_CAIRO_VERSION_MICRO 6
|
77
77
|
|
78
78
|
RB_CAIRO_VAR VALUE rb_mCairo;
|
79
79
|
RB_CAIRO_VAR VALUE rb_cCairo_Context;
|
@@ -96,6 +96,9 @@ cr_options_merge (VALUE self, VALUE other)
|
|
96
96
|
static VALUE
|
97
97
|
cr_options_equal (VALUE self, VALUE other)
|
98
98
|
{
|
99
|
+
if (!rb_cairo__is_kind_of (other, rb_cCairo_FontOptions))
|
100
|
+
return Qfalse;
|
101
|
+
|
99
102
|
return CBOOL2RVAL (cairo_font_options_equal (_SELF (self), _SELF (other)));
|
100
103
|
}
|
101
104
|
|
@@ -168,12 +171,13 @@ Init_cairo_font_options (void)
|
|
168
171
|
rb_define_class_under (rb_mCairo, "FontOptions", rb_cObject);
|
169
172
|
|
170
173
|
rb_define_alloc_func (rb_cCairo_FontOptions, cr_options_allocate);
|
171
|
-
|
174
|
+
|
172
175
|
rb_define_method (rb_cCairo_FontOptions, "initialize", cr_options_create, 0);
|
173
176
|
|
174
177
|
rb_define_method (rb_cCairo_FontOptions, "dup", cr_options_copy, 0);
|
175
178
|
rb_define_method (rb_cCairo_FontOptions, "merge!", cr_options_merge, 1);
|
176
179
|
rb_define_alias (rb_cCairo_FontOptions, "update", "merge!");
|
180
|
+
rb_define_method (rb_cCairo_FontOptions, "==", cr_options_equal, 1);
|
177
181
|
rb_define_method (rb_cCairo_FontOptions, "eql?", cr_options_equal, 1);
|
178
182
|
rb_define_method (rb_cCairo_FontOptions, "hash", cr_options_hash, 0);
|
179
183
|
rb_define_method (rb_cCairo_FontOptions, "set_antialias",
|
@@ -1232,11 +1232,34 @@ cr_win32_surface_initialize (int argc, VALUE *argv, VALUE self)
|
|
1232
1232
|
surface = cairo_win32_surface_create (NUM2PTR (hdc));
|
1233
1233
|
break;
|
1234
1234
|
case 2:
|
1235
|
-
|
1236
|
-
|
1237
|
-
|
1238
|
-
|
1239
|
-
|
1235
|
+
# if CAIRO_CHECK_VERSION(1, 11, 4)
|
1236
|
+
# define CAIRO_FORMAT_MAX CAIRO_FORMAT_RGB30
|
1237
|
+
# else
|
1238
|
+
# define CAIRO_FORMAT_MAX CAIRO_FORMAT_RGB16_565
|
1239
|
+
# endif
|
1240
|
+
if (CAIRO_FORMAT_ARGB32 <= NUM2INT (arg2) &&
|
1241
|
+
NUM2INT (arg2) <= CAIRO_FORMAT_MAX)
|
1242
|
+
{
|
1243
|
+
# if CAIRO_CHECK_VERSION(1, 15, 2)
|
1244
|
+
hdc = arg1;
|
1245
|
+
format = arg2;
|
1246
|
+
surface =
|
1247
|
+
cairo_win32_surface_create_with_format (NUM2PTR (hdc),
|
1248
|
+
RVAL2CRFORMAT (format));
|
1249
|
+
# else
|
1250
|
+
rb_raise (rb_eArgError,
|
1251
|
+
"Cairo::Win32Surface.new(hdc, format) "
|
1252
|
+
"is available since cairo >= 1.15.2");
|
1253
|
+
# endif
|
1254
|
+
}
|
1255
|
+
else
|
1256
|
+
{
|
1257
|
+
width = arg1;
|
1258
|
+
height = arg2;
|
1259
|
+
surface = cairo_win32_surface_create_with_dib (CAIRO_FORMAT_ARGB32,
|
1260
|
+
NUM2INT (width),
|
1261
|
+
NUM2INT (height));
|
1262
|
+
}
|
1240
1263
|
break;
|
1241
1264
|
case 3:
|
1242
1265
|
if (NIL_P (arg1) ||
|
data/test/test_font_options.rb
CHANGED
@@ -7,7 +7,52 @@ class FontOptionsTest < Test::Unit::TestCase
|
|
7
7
|
@options = Cairo::FontOptions.new
|
8
8
|
end
|
9
9
|
|
10
|
-
|
11
|
-
|
10
|
+
sub_test_case "#==" do
|
11
|
+
test "not FontOptions" do
|
12
|
+
assert do
|
13
|
+
!(@options == nil)
|
14
|
+
end
|
15
|
+
end
|
16
|
+
|
17
|
+
test "same object" do
|
18
|
+
assert do
|
19
|
+
@options == @options
|
20
|
+
end
|
21
|
+
end
|
22
|
+
|
23
|
+
test "same content" do
|
24
|
+
assert do
|
25
|
+
@options == @options.dup
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
29
|
+
|
30
|
+
sub_test_case "#eql? and #hash" do
|
31
|
+
test "not FontOptions" do
|
32
|
+
object = Object.new
|
33
|
+
options = @options
|
34
|
+
object.singleton_class.__send__(:define_method, :hash) do
|
35
|
+
options.hash
|
36
|
+
end
|
37
|
+
|
38
|
+
hash = {
|
39
|
+
object => :value,
|
40
|
+
}
|
41
|
+
assert_nil(hash[@options])
|
42
|
+
end
|
43
|
+
|
44
|
+
test "same object" do
|
45
|
+
hash = {
|
46
|
+
@options => :value,
|
47
|
+
}
|
48
|
+
assert_equal(:value, hash[@options])
|
49
|
+
end
|
50
|
+
|
51
|
+
test "same content" do
|
52
|
+
hash = {
|
53
|
+
@options => :value,
|
54
|
+
}
|
55
|
+
assert_equal(:value, hash[@options.dup])
|
56
|
+
end
|
12
57
|
end
|
13
58
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cairo
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.14.
|
4
|
+
version: 1.14.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Kouhei Sutou
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2016-07-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: pkg-config
|
@@ -201,29 +201,28 @@ signing_key:
|
|
201
201
|
specification_version: 4
|
202
202
|
summary: Ruby bindings for cairo
|
203
203
|
test_files:
|
204
|
+
- test/test_quartz_image_surface.rb
|
205
|
+
- test/test_image_surface.rb
|
206
|
+
- test/test_paper.rb
|
207
|
+
- test/test_constants.rb
|
204
208
|
- test/test_context.rb
|
209
|
+
- test/test_text_extents.rb
|
210
|
+
- test/test_color.rb
|
211
|
+
- test/test_scaled_font.rb
|
212
|
+
- test/test_text_to_glyphs_data.rb
|
213
|
+
- test/test_region.rb
|
205
214
|
- test/test_surface.rb
|
206
|
-
- test/
|
215
|
+
- test/test_recording_surface.rb
|
216
|
+
- test/test_script_device.rb
|
207
217
|
- test/test_text_cluster.rb
|
208
|
-
- test/cairo-test-utils.rb
|
209
218
|
- test/test_script_surface.rb
|
210
|
-
- test/
|
211
|
-
- test/
|
212
|
-
- test/test_quartz_image_surface.rb
|
213
|
-
- test/test_paper.rb
|
219
|
+
- test/test_font_extents.rb
|
220
|
+
- test/test_tee_surface.rb
|
214
221
|
- test/test_raster_source_pattern.rb
|
215
|
-
- test/test_region.rb
|
216
|
-
- test/test_script_device.rb
|
217
|
-
- test/test_font_face.rb
|
218
|
-
- test/test_recording_surface.rb
|
219
|
-
- test/test_scaled_font.rb
|
220
222
|
- test/test_xml_surface.rb
|
221
|
-
- test/run-test.rb
|
222
|
-
- test/test_image_surface.rb
|
223
|
-
- test/test_font_options.rb
|
224
|
-
- test/test_tee_surface.rb
|
225
|
-
- test/test_font_extents.rb
|
226
|
-
- test/test_xml_device.rb
|
227
223
|
- test/test_exception.rb
|
228
|
-
- test/
|
229
|
-
|
224
|
+
- test/test_xml_device.rb
|
225
|
+
- test/test_font_face.rb
|
226
|
+
- test/test_font_options.rb
|
227
|
+
- test/run-test.rb
|
228
|
+
- test/cairo-test-utils.rb
|