cairo 1.16.3 → 1.17.5

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 1092a9e815c9ca80088e0510376c96f12afa69d8262d2aa45b8728806533982f
4
- data.tar.gz: c5c8e094a7b71f88e7eb8cc8d2f313d97716b89a244fddbbfcdeee70ec2ac934
3
+ metadata.gz: 5775df8bb8a56c3b4274ef0696f9364fe02490bea3164af4bd2b72bfcc6779e4
4
+ data.tar.gz: ed53259db771ecd57cf7a923b2f9e2b63b312b44021e48ddc0e3ddfb7c1bafc4
5
5
  SHA512:
6
- metadata.gz: fb2ee47dca5f0596e5caff413752c78c4762463019014d9d60f5df6cb58945cf9c3c7b91ecce9ade3b30e531b08688218f79ec8c9ff2be469a146fcf08729e30
7
- data.tar.gz: 887e2986b4ea7a737c7f327ef16c8341ba1882ef7eca8ee645fc319d093893a1710048b60f8eb2205a1d3848ff9f55452d8ac9ed1b812fd9ac2ad9f45a50db60
6
+ metadata.gz: db3510810d933b993b021919b772bab5f4fcca734402a57b6fb86c3f3c53650b6ffbab494b9768cc1ea5809db78873f2d7b50031078e7cd5d542be5cdbd6e63f
7
+ data.tar.gz: d1647888e3e61430a12b2d3268c10d8832d1dad85777d8eb4d99c1be1cb33fd7c73ad0b2a2deeb0fd691c61da148454aa373172749ecd50af9c62715989d6e91
data/NEWS CHANGED
@@ -1,5 +1,75 @@
1
+ Release 1.17.4 (2021-01-17) Sutou Kouhei <kou@cozmixng.org>
2
+ ===========================================================
3
+
4
+ Improvements
5
+ ------------
6
+
7
+ * Added support for Red Colors.
8
+
9
+ Release 1.16.6 (2020-07-23) Sutou Kouhei <kou@cozmixng.org>
10
+ ===========================================================
11
+
12
+ Improvements
13
+ ------------
14
+
15
+ * Specified GPL 2.0 or later explicitly in gemspec.
16
+ [GitHub#62][Reported by Gabriel Mazetto]
17
+
18
+ * Added more metadata to gem.
19
+ [GitHub#63][Patch by Gabriel Mazetto]
20
+
21
+ Fixes
22
+ -----
23
+
24
+ * Windows: Fixed a link error.
25
+ [GitHub#ruby-gnome/ruby-gnome#1402][Reported by dsisnero]
26
+
27
+ Thanks
28
+ ------
29
+
30
+ * Gabriel Mazetto
31
+
32
+ * dsisnero
33
+
34
+ Release 1.16.5 (2020-02-03) Sutou Kouhei <kou@cozmixng.org>
35
+ ===========================================================
36
+
37
+ Improvements
38
+ ------------
39
+
40
+ * Added Cairo::Context#raw_address for integration with other
41
+ libraries.
42
+ [GitHub#59][Reported by kojix2]
43
+
44
+ Fixes
45
+ -----
46
+
47
+ * Changed to use only ASCII for color name.
48
+ [GitHub#57][Reported by spoolkitamura]
49
+
50
+ * Fixed the number of arguments of the following methods:
51
+
52
+ * Cairo::Surface#copy_page
53
+
54
+ * Cairo::Surface#show_page
55
+
56
+ Thanks
57
+ ------
58
+
59
+ * spoolkitamura
60
+
61
+ * kojix2
62
+
63
+ Release 1.16.4 (2019-03-09) Kouhei Sutou <kou@cozmixng.org>
64
+ ===========================================================
65
+
66
+ Fixes
67
+ -----
68
+
69
+ * Removed Skia related code entirely.
70
+
1
71
  Release 1.16.3 (2019-03-09) Kouhei Sutou <kou@cozmixng.org>
2
- ============================================================
72
+ ===========================================================
3
73
 
4
74
  Improvements
5
75
  ------------
@@ -26,7 +96,7 @@ Thanks
26
96
  * spoolkitamura.
27
97
 
28
98
  Release 1.16.2 (2018-10-31) Kouhei Sutou <kou@cozmixng.org>
29
- ============================================================
99
+ ===========================================================
30
100
 
31
101
  Improvements
32
102
  ------------
@@ -35,7 +105,7 @@ Improvements
35
105
  MSYS2 packages.
36
106
 
37
107
  Release 1.16.1 (2018-10-31) Kouhei Sutou <kou@cozmixng.org>
38
- ============================================================
108
+ ===========================================================
39
109
 
40
110
  Improvements
41
111
  ------------
@@ -43,7 +113,7 @@ Improvements
43
113
  * Added Cairo::Context#destroyed?.
44
114
 
45
115
  Release 1.16.0 (2018-10-28) Kouhei Sutou <kou@cozmixng.org>
46
- ============================================================
116
+ ===========================================================
47
117
 
48
118
  Improvements
49
119
  ------------
data/Rakefile CHANGED
@@ -1,13 +1,6 @@
1
1
  # -*- coding: utf-8; mode: ruby -*-
2
2
 
3
- require "English"
4
-
5
- require "find"
6
- require "fileutils"
7
- require "open-uri"
8
3
  require "rubygems"
9
- require "rubygems/package_task"
10
- require "yard"
11
4
  require "bundler/gem_helper"
12
5
  require "packnga"
13
6
 
@@ -32,6 +25,7 @@ Packnga::ReleaseTask.new(spec) do |task|
32
25
  end
33
26
 
34
27
  # for releasing
28
+ desc "Release to cairographics.org"
35
29
  task :dist do
36
30
  sh "./dist.sh", spec.version.to_s
37
31
  end
data/ext/cairo/cairo.def CHANGED
@@ -50,7 +50,6 @@ EXPORTS
50
50
  rb_cCairo_DRMSurface DATA
51
51
  rb_cCairo_TeeSurface DATA
52
52
  rb_cCairo_XMLSurface DATA
53
- rb_cCairo_SkiaSurface DATA
54
53
  rb_cCairo_SubSurface DATA
55
54
  rb_cCairo_CoglSurface DATA
56
55
 
data/ext/cairo/extconf.rb CHANGED
@@ -48,11 +48,12 @@ def required_pkg_config_package(package_info, native_package_info=nil)
48
48
  end
49
49
 
50
50
  unless required_pkg_config_package([package, major, minor, micro],
51
+ :arch_linux => "cairo",
51
52
  :debian => "libcairo2-dev",
52
- :redhat => "cairo-devel",
53
53
  :homebrew => "cairo",
54
54
  :macports => "cairo",
55
- :msys2 => "cairo")
55
+ :msys2 => "cairo",
56
+ :redhat => "cairo-devel")
56
57
  exit(false)
57
58
  end
58
59
 
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-2018 Kouhei Sutou <kou@cozmixng.org>
8
+ * Copyright 2006-2021 Sutou Kouhei <kou@cozmixng.org>
9
9
  * Copyright 2005 Øyvind Kolås <pippin@freedesktop.org>
10
10
  * Copyright 2004-2005 MenTaLguY <mental@rydia.com>
11
11
  *
@@ -53,17 +53,9 @@
53
53
 
54
54
  RB_CAIRO_BEGIN_DECLS
55
55
 
56
- #if defined(RUBY_CAIRO_PLATFORM_WIN32) && !defined(RB_CAIRO_PLATFORM_WIN32)
57
- # define RB_CAIRO_PLATFORM_WIN32 RUBY_CAIRO_PLATFORM_WIN32
58
- #endif
59
-
60
- #if defined(RUBY_CAIRO_STATIC_COMPILATION) && !defined(RB_CAIRO_STATIC_COMPILATION)
61
- # define RB_CAIRO_STATIC_COMPILATION RUBY_CAIRO_STATIC_COMPILATION
62
- #endif
63
-
64
- #if defined(RB_CAIRO_PLATFORM_WIN32) && !defined(RB_CAIRO_STATIC_COMPILATION)
56
+ #ifdef __WIN32__
65
57
  # ifdef RB_CAIRO_COMPILATION
66
- # define RB_CAIRO_VAR __declspec(dllexport)
58
+ # define RB_CAIRO_VAR extern __declspec(dllexport)
67
59
  # else
68
60
  # define RB_CAIRO_VAR extern __declspec(dllimport)
69
61
  # endif
@@ -72,8 +64,8 @@ RB_CAIRO_BEGIN_DECLS
72
64
  #endif
73
65
 
74
66
  #define RB_CAIRO_VERSION_MAJOR 1
75
- #define RB_CAIRO_VERSION_MINOR 16
76
- #define RB_CAIRO_VERSION_MICRO 3
67
+ #define RB_CAIRO_VERSION_MINOR 17
68
+ #define RB_CAIRO_VERSION_MICRO 5
77
69
 
78
70
  RB_CAIRO_VAR VALUE rb_mCairo;
79
71
  RB_CAIRO_VAR VALUE rb_cCairo_Context;
@@ -125,7 +117,6 @@ RB_CAIRO_VAR VALUE rb_cCairo_GLTextureSurface;
125
117
  RB_CAIRO_VAR VALUE rb_cCairo_DRMSurface;
126
118
  RB_CAIRO_VAR VALUE rb_cCairo_TeeSurface;
127
119
  RB_CAIRO_VAR VALUE rb_cCairo_XMLSurface;
128
- RB_CAIRO_VAR VALUE rb_cCairo_SkiaSurface;
129
120
  RB_CAIRO_VAR VALUE rb_cCairo_SubSurface;
130
121
  RB_CAIRO_VAR VALUE rb_cCairo_Device;
131
122
  RB_CAIRO_VAR VALUE rb_cCairo_DRMDevice;
@@ -5,7 +5,7 @@
5
5
  * $Author: kou $
6
6
  * $Date: 2008-09-19 12:56:27 $
7
7
  *
8
- * Copyright 2005-2017 Kouhei Sutou <kou@cozmixng.org>
8
+ * Copyright 2005-2019 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
  *
@@ -92,7 +92,9 @@ VALUE rb_mCairo_SVGUnit = Qnil;
92
92
  #else
93
93
  # define CAIRO_FORMAT_MIN CAIRO_FORMAT_ARGB32
94
94
  #endif
95
- #if CAIRO_CHECK_VERSION(1, 11, 4)
95
+ #if CAIRO_CHECK_VERSION(1, 17, 2)
96
+ # define CAIRO_FORMAT_MAX CAIRO_FORMAT_RGBA128F
97
+ #elif CAIRO_CHECK_VERSION(1, 11, 4)
96
98
  # define CAIRO_FORMAT_MAX CAIRO_FORMAT_RGB30
97
99
  #else
98
100
  # define CAIRO_FORMAT_MAX CAIRO_FORMAT_RGB16_565
@@ -566,6 +568,12 @@ Init_cairo_constants (void)
566
568
  rb_define_const (rb_mCairo_Format, "RGB30",
567
569
  INT2FIX (CAIRO_FORMAT_RGB30));
568
570
  #endif
571
+ #if CAIRO_CHECK_VERSION(1, 17, 2)
572
+ rb_define_const (rb_mCairo_Format, "RGB96F",
573
+ INT2FIX (CAIRO_FORMAT_RGB96F));
574
+ rb_define_const (rb_mCairo_Format, "RGBA128F",
575
+ INT2FIX (CAIRO_FORMAT_RGBA128F));
576
+ #endif
569
577
 
570
578
  #if CAIRO_CHECK_VERSION(1, 5, 8)
571
579
  rb_define_singleton_method (rb_mCairo_Format, "stride_for_width",
@@ -240,6 +240,12 @@ cr_to_ptr (VALUE self)
240
240
  1, PTR2NUM (_SELF));
241
241
  }
242
242
 
243
+ static VALUE
244
+ cr_raw_address (VALUE self)
245
+ {
246
+ return PTR2NUM (_SELF);
247
+ }
248
+
243
249
 
244
250
  static VALUE
245
251
  cr_restore (VALUE self)
@@ -1874,6 +1880,8 @@ Init_cairo_context (void)
1874
1880
 
1875
1881
  rb_define_method (rb_cCairo_Context, "to_ptr", cr_to_ptr, 0);
1876
1882
 
1883
+ rb_define_method (rb_cCairo_Context, "raw_address", cr_raw_address, 0);
1884
+
1877
1885
  #if CAIRO_CHECK_VERSION(1, 15, 4)
1878
1886
  /* Logical structure tagging functions */
1879
1887
  {
@@ -5,6 +5,7 @@
5
5
  * $Author: kou $
6
6
  * $Date: 2008-09-26 14:13:58 $
7
7
  *
8
+ * Copyright 2003-2019 Sutou Kouhei <kou@cozmixng.org>
8
9
  * Copyright 2005 Øyvind Kolås <pippin@freedesktop.org>
9
10
  * Copyright 2004-2005 MenTaLguY <mental@rydia.com>
10
11
  *
@@ -148,7 +149,11 @@ cr_font_face_freetype_supported_p (VALUE klass)
148
149
 
149
150
  #ifdef CAIRO_HAS_FT_FONT
150
151
  static VALUE
151
- cr_freetype_done_library (VALUE data)
152
+ cr_freetype_done_library (VALUE yielded_arg,
153
+ VALUE callback_arg,
154
+ int argc,
155
+ const VALUE *argv,
156
+ VALUE block_arg)
152
157
  {
153
158
  cr_freetype_finishing = CR_TRUE;
154
159
  if (cr_freetype_n_faces == 0)
@@ -5,7 +5,7 @@
5
5
  * $Author: kou $
6
6
  * $Date: 2008-09-19 12:56:27 $
7
7
  *
8
- * Copyright 2005-2018 Kouhei Sutou <kou@cozmixng.org>
8
+ * Copyright 2005-2021 Sutou Kouhei <kou@cozmixng.org>
9
9
  *
10
10
  * This file is made available under the same terms as Ruby
11
11
  *
@@ -104,7 +104,7 @@ cr_options_equal (VALUE self, VALUE other)
104
104
  static VALUE
105
105
  cr_options_hash (VALUE self)
106
106
  {
107
- return INT2NUM (cairo_font_options_hash (_SELF (self)));
107
+ return ULONG2NUM (cairo_font_options_hash (_SELF (self)));
108
108
  }
109
109
 
110
110
  static VALUE
@@ -2,7 +2,7 @@
2
2
  /*
3
3
  * Ruby Cairo Binding
4
4
  *
5
- * Copyright 2005-2019 Kouhei Sutou <kou@cozmixng.org>
5
+ * Copyright 2005-2021 Sutou Kouhei <kou@cozmixng.org>
6
6
  *
7
7
  * This file is made available under the same terms as Ruby
8
8
  *
@@ -44,11 +44,11 @@ rb_cairo__io_closure_free (void *closure)
44
44
  }
45
45
 
46
46
  static VALUE
47
- rb_cairo__io_func_rescue (VALUE io_closure)
47
+ rb_cairo__io_func_rescue (VALUE io_closure, VALUE error)
48
48
  {
49
49
  rb_cairo__io_callback_closure_t *closure;
50
50
  closure = (rb_cairo__io_callback_closure_t *)io_closure;
51
- closure->error = RB_ERRINFO;
51
+ closure->error = error;
52
52
  return Qnil;
53
53
  }
54
54
 
@@ -130,7 +130,7 @@ rb_cairo__io_read_func_invoke (VALUE read_closure)
130
130
  {
131
131
  rb_str_concat (result,
132
132
  rb_funcall (input,
133
- rb_cairo__io_id_read, 1, INT2NUM (rest)));
133
+ rb_cairo__io_id_read, 1, LONG2NUM (rest)));
134
134
  }
135
135
 
136
136
  memcpy ((void *)closure->data, (const void *) StringValuePtr (result), length);
@@ -64,9 +64,8 @@ rb_cairo__const_get (VALUE name, const char *prefix)
64
64
  normalized_name_len = strlen (normalized_name);
65
65
 
66
66
  const_name = ALLOCA_N (char, prefix_len + normalized_name_len + 1);
67
- strncpy (const_name, prefix, prefix_len);
68
- strncpy (const_name + prefix_len, normalized_name, normalized_name_len);
69
- const_name[prefix_len + normalized_name_len] = '\0';
67
+ strcpy (const_name, prefix);
68
+ strcpy (const_name + prefix_len, normalized_name);
70
69
 
71
70
  return rb_const_get (rb_mCairo, rb_intern (const_name));
72
71
  }
@@ -2,7 +2,7 @@
2
2
  /*
3
3
  * Ruby Cairo Binding
4
4
  *
5
- * Copyright 2005-2018 Kouhei Sutou <kou@cozmixng.org>
5
+ * Copyright 2005-2019 Kouhei Sutou <kou@cozmixng.org>
6
6
  * Copyright 2014 Patrick Hanevold <patrick.hanevold@gmail.com>
7
7
  * Copyright 2005 Øyvind Kolås <pippin@freedesktop.org>
8
8
  * Copyright 2004-2005 MenTaLguY <mental@rydia.com>
@@ -2107,9 +2107,9 @@ Init_cairo_surface (void)
2107
2107
  #endif
2108
2108
  #if CAIRO_CHECK_VERSION(1, 5, 2)
2109
2109
  rb_define_method (rb_cCairo_Surface, "copy_page",
2110
- cr_surface_copy_page, 2);
2110
+ cr_surface_copy_page, 0);
2111
2111
  rb_define_method (rb_cCairo_Surface, "show_page",
2112
- cr_surface_show_page, 2);
2112
+ cr_surface_show_page, 0);
2113
2113
  #endif
2114
2114
 
2115
2115
  #ifdef CAIRO_HAS_PNG_FUNCTIONS
data/lib/cairo/color.rb CHANGED
@@ -1,3 +1,5 @@
1
+ require "colors"
2
+
1
3
  module Cairo
2
4
  module Color
3
5
  module_function
@@ -21,8 +23,14 @@ module Cairo
21
23
  begin
22
24
  const_get(name).dup
23
25
  rescue NameError
24
- raise ArgumentError, "unknown color name: #{value}"
26
+ color = Colors[value]
27
+ if color == value.to_s
28
+ raise ArgumentError, "unknown color name: #{value}"
29
+ end
30
+ RGB.new(*color.to_rgba.components)
25
31
  end
32
+ when Colors::AbstractColor
33
+ RGB.new(*value.to_rgba.components)
26
34
  else
27
35
  if robust
28
36
  raise ArgumentError, "can't parse as color name: #{value.inspect}"
data/lib/cairo/colors.rb CHANGED
@@ -90,8 +90,6 @@ module Cairo
90
90
  AUROMETALSAURUS = RGB.new(0.43137254901960786, 0.4980392156862745, 0.5019607843137255)
91
91
  # Avocado: #568203: (86, 130, 3)
92
92
  AVOCADO = RGB.new(0.33725490196078434, 0.5098039215686274, 0.011764705882352941)
93
- # Awesome: #FF2052: (255, 32, 82)
94
- AWESOME = RGB.new(1.0, 0.12549019607843137, 0.3215686274509804)
95
93
  # Axolotl: #63775B: (99, 119, 91)
96
94
  AXOLOTL = RGB.new(0.38823529411764707, 0.4666666666666667, 0.3568627450980392)
97
95
  # Azure: #007FFF: (0, 127, 255)
@@ -141,7 +139,7 @@ module Cairo
141
139
  # Beige: #F5F5DC: (245, 245, 220)
142
140
  BEIGE = RGB.new(0.9607843137254902, 0.9607843137254902, 0.8627450980392157)
143
141
  # Big dip o’ruby: #9C2542: (156, 37, 66)
144
- BIG_DIP_O’RUBY = RGB.new(0.611764705882353, 0.1450980392156863, 0.25882352941176473)
142
+ BIG_DIP_ORUBY = RGB.new(0.611764705882353, 0.1450980392156863, 0.25882352941176473)
145
143
  # Big Foot Feet: #E88E5A: (232, 142, 90)
146
144
  BIG_FOOT_FEET = RGB.new(0.9098039215686274, 0.5568627450980392, 0.35294117647058826)
147
145
  # Bisque: #FFE4C4: (255, 228, 196)
@@ -373,9 +371,9 @@ module Cairo
373
371
  # Cadmium violet: #7F3E98: (127, 62, 152)
374
372
  CADMIUM_VIOLET = RGB.new(0.4980392156862745, 0.24313725490196078, 0.596078431372549)
375
373
  # Café au lait: #A67B5B: (166, 123, 91)
376
- CAFÉ_AU_LAIT = RGB.new(0.6509803921568628, 0.4823529411764706, 0.3568627450980392)
374
+ CAFE_AU_LAIT = RGB.new(0.6509803921568628, 0.4823529411764706, 0.3568627450980392)
377
375
  # Café noir: #4B3621: (75, 54, 33)
378
- CAFÉ_NOIR = RGB.new(0.29411764705882354, 0.21176470588235294, 0.12941176470588237)
376
+ CAFE_NOIR = RGB.new(0.29411764705882354, 0.21176470588235294, 0.12941176470588237)
379
377
  # Cal Poly Pomona green: #1E4D2B: (30, 77, 43)
380
378
  CAL_POLY_POMONA_GREEN = RGB.new(0.11764705882352941, 0.30196078431372547, 0.16862745098039217)
381
379
  # Calamansi: #FCFFA4: (252, 255, 164)
@@ -1215,7 +1213,7 @@ module Cairo
1215
1213
  # Guyabano: #F8F8F8: (248, 248, 248)
1216
1214
  GUYABANO = RGB.new(0.9725490196078431, 0.9725490196078431, 0.9725490196078431)
1217
1215
  # Halayà úbe: #663854: (102, 55, 84)
1218
- HALAYÀ_ÚBE = RGB.new(0.4, 0.21568627450980393, 0.32941176470588235)
1216
+ HALAYA_UBE = RGB.new(0.4, 0.21568627450980393, 0.32941176470588235)
1219
1217
  # Halloween orange: #EB6123: (235, 97, 35)
1220
1218
  HALLOWEEN_ORANGE = RGB.new(0.9215686274509803, 0.3803921568627451, 0.13725490196078433)
1221
1219
  # Han blue: #446CCF: (68, 108, 207)
@@ -2118,6 +2116,8 @@ module Cairo
2118
2116
  PAYNES_GREY = RGB.new(0.3254901960784314, 0.40784313725490196, 0.47058823529411764)
2119
2117
  # Peach: #FFE5B4: (255, 229, 180)
2120
2118
  PEACH = RGB.new(1.0, 0.8980392156862745, 0.7058823529411765)
2119
+ # Peach (Crayola): #FFCBA4: (255, 203, 164)
2120
+ PEACH_CRAYOLA = RGB.new(1.0, 0.796078431372549, 0.6431372549019608)
2121
2121
  # Peach-orange: #FFCC99: (255, 204, 153)
2122
2122
  PEACH_ORANGE = RGB.new(1.0, 0.8, 0.6)
2123
2123
  # Peach puff: #FFDAB9: (255, 218, 185)
data/test/run-test.rb CHANGED
@@ -1,22 +1,24 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
- base_dir = File.expand_path(File.join(File.dirname(__FILE__), ".."))
4
- ext_dir = File.join(base_dir, "ext", "cairo")
5
- lib_dir = File.join(base_dir, "lib")
6
- test_dir = File.join(base_dir, "test")
3
+ source_dir = File.expand_path(File.join(__dir__, ".."))
4
+ build_dir = File.expand_path(".")
5
+ ext_dir = File.join(build_dir, "ext", "cairo")
6
+ lib_dir = File.join(source_dir, "lib")
7
+ test_dir = File.join(source_dir, "test")
7
8
 
8
9
  if system("which make >/dev/null 2>&1")
9
- Dir.chdir(base_dir) do
10
- system("make > /dev/null") or exit(1)
10
+ Dir.chdir(build_dir) do
11
+ if File.exist?("Makefile")
12
+ system("make > /dev/null") or exit(1)
13
+ end
11
14
  end
12
15
  end
13
16
 
14
17
  require "test-unit"
15
18
 
16
- $LOAD_PATH.unshift(base_dir)
17
19
  $LOAD_PATH.unshift(ext_dir)
18
20
  $LOAD_PATH.unshift(lib_dir)
19
21
 
20
22
  require_relative "helper"
21
23
 
22
- exit Test::Unit::AutoRunner.run(true, test_dir)
24
+ exit(Test::Unit::AutoRunner.run(true, test_dir))
data/test/test_colors.rb CHANGED
@@ -263,12 +263,6 @@ class ColorsTest < Test::Unit::TestCase
263
263
  Cairo::Color::AVOCADO.to_s)
264
264
  end
265
265
 
266
- # Awesome: #FF2052: (255, 32, 82)
267
- test("Awesome") do
268
- assert_equal("\#%02X%02X%02XFF" % [255, 32, 82],
269
- Cairo::Color::AWESOME.to_s)
270
- end
271
-
272
266
  # Axolotl: #63775B: (99, 119, 91)
273
267
  test("Axolotl") do
274
268
  assert_equal("\#%02X%02X%02XFF" % [99, 119, 91],
@@ -416,7 +410,7 @@ class ColorsTest < Test::Unit::TestCase
416
410
  # Big dip o’ruby: #9C2542: (156, 37, 66)
417
411
  test("Big dip o\u2019ruby") do
418
412
  assert_equal("\#%02X%02X%02XFF" % [156, 37, 66],
419
- Cairo::Color::BIG_DIP_O’RUBY.to_s)
413
+ Cairo::Color::BIG_DIP_ORUBY.to_s)
420
414
  end
421
415
 
422
416
  # Big Foot Feet: #E88E5A: (232, 142, 90)
@@ -1112,13 +1106,13 @@ class ColorsTest < Test::Unit::TestCase
1112
1106
  # Café au lait: #A67B5B: (166, 123, 91)
1113
1107
  test("Caf\u00E9 au lait") do
1114
1108
  assert_equal("\#%02X%02X%02XFF" % [166, 123, 91],
1115
- Cairo::Color::CAFÉ_AU_LAIT.to_s)
1109
+ Cairo::Color::CAFE_AU_LAIT.to_s)
1116
1110
  end
1117
1111
 
1118
1112
  # Café noir: #4B3621: (75, 54, 33)
1119
1113
  test("Caf\u00E9 noir") do
1120
1114
  assert_equal("\#%02X%02X%02XFF" % [75, 54, 33],
1121
- Cairo::Color::CAFÉ_NOIR.to_s)
1115
+ Cairo::Color::CAFE_NOIR.to_s)
1122
1116
  end
1123
1117
 
1124
1118
  # Cal Poly Pomona green: #1E4D2B: (30, 77, 43)
@@ -3638,7 +3632,7 @@ class ColorsTest < Test::Unit::TestCase
3638
3632
  # Halayà úbe: #663854: (102, 55, 84)
3639
3633
  test("Halay\u00E0 \u00FAbe") do
3640
3634
  assert_equal("\#%02X%02X%02XFF" % [102, 55, 84],
3641
- Cairo::Color::HALAYÀ_ÚBE.to_s)
3635
+ Cairo::Color::HALAYA_UBE.to_s)
3642
3636
  end
3643
3637
 
3644
3638
  # Halloween orange: #EB6123: (235, 97, 35)
@@ -6347,6 +6341,12 @@ class ColorsTest < Test::Unit::TestCase
6347
6341
  Cairo::Color::PEACH.to_s)
6348
6342
  end
6349
6343
 
6344
+ # Peach (Crayola): #FFCBA4: (255, 203, 164)
6345
+ test("Peach (Crayola)") do
6346
+ assert_equal("\#%02X%02X%02XFF" % [255, 203, 164],
6347
+ Cairo::Color::PEACH_CRAYOLA.to_s)
6348
+ end
6349
+
6350
6350
  # Peach-orange: #FFCC99: (255, 204, 153)
6351
6351
  test("Peach-orange") do
6352
6352
  assert_equal("\#%02X%02X%02XFF" % [255, 204, 153],
data/test/test_context.rb CHANGED
@@ -122,4 +122,11 @@ class ContextTest < Test::Unit::TestCase
122
122
  uris)
123
123
  end
124
124
  end
125
+
126
+ def test_raw_address
127
+ context = Cairo::Context.new(@surface)
128
+ assert do
129
+ context.raw_address > 0
130
+ end
131
+ end
125
132
  end
metadata CHANGED
@@ -1,15 +1,29 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cairo
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.16.3
4
+ version: 1.17.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kouhei Sutou
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-03-09 00:00:00.000000000 Z
11
+ date: 2021-02-04 00:00:00.000000000 Z
12
12
  dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: native-package-installer
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ">="
18
+ - !ruby/object:Gem::Version
19
+ version: 1.0.3
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ">="
25
+ - !ruby/object:Gem::Version
26
+ version: 1.0.3
13
27
  - !ruby/object:Gem::Dependency
14
28
  name: pkg-config
15
29
  requirement: !ruby/object:Gem::Requirement
@@ -25,19 +39,19 @@ dependencies:
25
39
  - !ruby/object:Gem::Version
26
40
  version: 1.2.2
27
41
  - !ruby/object:Gem::Dependency
28
- name: native-package-installer
42
+ name: red-colors
29
43
  requirement: !ruby/object:Gem::Requirement
30
44
  requirements:
31
45
  - - ">="
32
46
  - !ruby/object:Gem::Version
33
- version: 1.0.3
47
+ version: '0'
34
48
  type: :runtime
35
49
  prerelease: false
36
50
  version_requirements: !ruby/object:Gem::Requirement
37
51
  requirements:
38
52
  - - ">="
39
53
  - !ruby/object:Gem::Version
40
- version: 1.0.3
54
+ version: '0'
41
55
  - !ruby/object:Gem::Dependency
42
56
  name: bundler
43
57
  requirement: !ruby/object:Gem::Requirement
@@ -197,7 +211,13 @@ files:
197
211
  homepage: https://rcairo.github.io/
198
212
  licenses:
199
213
  - Ruby
214
+ - GPL-2.0-or-later
200
215
  metadata:
216
+ bug_tracker_uri: https://github.com/rcairo/rcairo/issues
217
+ changelog_uri: https://github.com/rcairo/rcairo/blob/master/NEWS
218
+ documentation_uri: https://rcairo.github.io/doc/
219
+ mailing_list_uri: https://cairographics.org/cgi-bin/mailman/listinfo/cairo
220
+ source_code_uri: https://github.com/rcairo/rcairo
201
221
  msys2_mingw_dependencies: cairo
202
222
  post_install_message:
203
223
  rdoc_options: []
@@ -207,44 +227,44 @@ required_ruby_version: !ruby/object:Gem::Requirement
207
227
  requirements:
208
228
  - - ">="
209
229
  - !ruby/object:Gem::Version
210
- version: '0'
230
+ version: 2.2.1
211
231
  required_rubygems_version: !ruby/object:Gem::Requirement
212
232
  requirements:
213
233
  - - ">="
214
234
  - !ruby/object:Gem::Version
215
235
  version: '0'
216
- requirements: []
217
- rubyforge_project:
218
- rubygems_version: 2.7.6
236
+ requirements:
237
+ - cairo >= 1.2.0
238
+ rubygems_version: 3.3.0.dev
219
239
  signing_key:
220
240
  specification_version: 4
221
241
  summary: Ruby bindings for cairo
222
242
  test_files:
223
- - test/test_text_cluster.rb
224
- - test/test_text_extents.rb
225
- - test/test_font_extents.rb
243
+ - test/helper.rb
244
+ - test/run-test.rb
245
+ - test/test_color.rb
226
246
  - test/test_colors.rb
227
- - test/test_scaled_font.rb
228
- - test/test_paper.rb
229
- - test/test_svg_surface.rb
230
- - test/test_script_device.rb
231
- - test/test_xml_device.rb
232
- - test/test_script_surface.rb
247
+ - test/test_constants.rb
233
248
  - test/test_context.rb
234
- - test/helper.rb
249
+ - test/test_exception.rb
250
+ - test/test_font_extents.rb
235
251
  - test/test_font_face.rb
236
- - test/test_raster_source_pattern.rb
252
+ - test/test_font_options.rb
237
253
  - test/test_image_surface.rb
254
+ - test/test_paper.rb
255
+ - test/test_pdf_surface.rb
238
256
  - test/test_quartz_image_surface.rb
239
- - test/run-test.rb
257
+ - test/test_raster_source_pattern.rb
240
258
  - test/test_recording_surface.rb
259
+ - test/test_region.rb
260
+ - test/test_scaled_font.rb
261
+ - test/test_script_device.rb
262
+ - test/test_script_surface.rb
263
+ - test/test_surface.rb
264
+ - test/test_svg_surface.rb
241
265
  - test/test_tee_surface.rb
242
- - test/test_font_options.rb
243
- - test/test_color.rb
244
- - test/test_constants.rb
266
+ - test/test_text_cluster.rb
267
+ - test/test_text_extents.rb
245
268
  - test/test_text_to_glyphs_data.rb
246
- - test/test_pdf_surface.rb
247
- - test/test_surface.rb
248
- - test/test_exception.rb
269
+ - test/test_xml_device.rb
249
270
  - test/test_xml_surface.rb
250
- - test/test_region.rb