cairo 1.15.10 → 1.15.11

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
  SHA1:
3
- metadata.gz: e98d253ecf1026eae9b0e632d7da4e96eb8c1b56
4
- data.tar.gz: 168a50409bfc3cca15329ea0352652b3bbbc9b32
3
+ metadata.gz: 34b11b8c1ae448f815823449a9f37622bb952b61
4
+ data.tar.gz: 403fb49f93c31a654fdd40672320563e261eb439
5
5
  SHA512:
6
- metadata.gz: b59c0c32c42824aad114dc98078e99079d1919607d708e3435e4397a063199be01d2a10e0d734635724e6cc8688f478a877338d7b76895adf04fa73d9c638632
7
- data.tar.gz: eee06bf5b91c207838c2ba8c2c285a3f523275d75afbc2c9cc7c16f11a139938c4f7354a324c43ab3eb65d8a238681ab62c76eb8c15b820e44f90a3f094a7c52
6
+ metadata.gz: 4efa06c17c9cd290c9de82f95c0afeab5dc90fc86f0d85ba7cce8df702cff5d1e07772083b4a5c179849782bd64b8f43c274f9f8280a1e92016f1e74f54f760e
7
+ data.tar.gz: 8c90fde858b2ce0f7b22bef821c838116bd10f225d892db7336e4653dd803776485a03d2092e5c9b4cb17c7a1fd9cde6955bd67bb5c14280f9058ae7ca0cfd12
data/NEWS CHANGED
@@ -1,3 +1,41 @@
1
+ Release 1.15.11 (2017-12-14) Kouhei Sutou <kou@cozmixng.org>
2
+ ============================================================
3
+
4
+ Improvements
5
+ ------------
6
+
7
+ * Added cairo 1.15.10 support.
8
+
9
+ * Added Cairo::SVGUnit
10
+
11
+ * Added Cairo::SVGSurface#document_unit
12
+
13
+ * Added Cairo::SVGSurface#document_unit=
14
+
15
+ * Added Cairo::MIMEType::CCITT_FAX
16
+
17
+ * Added Cairo::MIMEType::CCITT_FAX_PARAMS
18
+
19
+ * Added Cairo::MIMEType::EPS
20
+
21
+ * Added Cairo::MIMEType::EPS_PARAMS
22
+
23
+ * test: Updated expected value for cairo 1.15.
24
+ [GitHub#50][Reported by Mamoru TASAKA]
25
+
26
+ * Windows: Updated bundled libraries:
27
+
28
+ * libpng: 1.6.32 -> 1.6.34
29
+
30
+ * libxml2: 2.9.6 -> 2.9.7
31
+
32
+ * cairo: 1.15.8 -> 1.15.10
33
+
34
+ Thanks
35
+ ------
36
+
37
+ * Mamoru TASAKA
38
+
1
39
  Release 1.15.10 (2017-10-15) Kouhei Sutou <kou@cozmixng.org>
2
40
  ============================================================
3
41
 
data/Rakefile CHANGED
@@ -444,7 +444,7 @@ end
444
444
 
445
445
  windows_task = WindowsTask.new(spec) do |task|
446
446
  zlib_version = "1.2.11"
447
- libpng_version = "1.6.32"
447
+ libpng_version = "1.6.34"
448
448
  freetype_version = "2.8.1"
449
449
  task.packages = [
450
450
  {
@@ -477,7 +477,7 @@ windows_task = WindowsTask.new(spec) do |task|
477
477
  },
478
478
  {
479
479
  :name => "libxml2",
480
- :version => "2.9.6",
480
+ :version => "2.9.7",
481
481
  :download_base_url => "ftp://xmlsoft.org/libxml2",
482
482
  :compression_method => "gz",
483
483
  :windows => {
@@ -511,7 +511,7 @@ windows_task = WindowsTask.new(spec) do |task|
511
511
  },
512
512
  {
513
513
  :name => "cairo",
514
- :version => "1.15.8",
514
+ :version => "1.15.10",
515
515
  :download_site => :cairo_snapshots,
516
516
  :windows => {
517
517
  :built_file => "bin/libcairo-2.dll",
@@ -85,6 +85,10 @@ EXPORTS
85
85
  rb_mCairo_TextClusterFlag DATA
86
86
  rb_mCairo_ScriptMode DATA
87
87
  rb_mCairo_MimeType DATA
88
+ rb_mCairo_RegionOverlap DATA
89
+ rb_mCairo_PDFOutlineFlags DATA
90
+ rb_mCairo_PDFMetadata DATA
91
+ rb_mCairo_SVGUnit DATA
88
92
 
89
93
  rb_mCairo_Color DATA
90
94
  rb_cCairo_Color_Base DATA
@@ -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 15
76
- #define RB_CAIRO_VERSION_MICRO 10
76
+ #define RB_CAIRO_VERSION_MICRO 11
77
77
 
78
78
  RB_CAIRO_VAR VALUE rb_mCairo;
79
79
  RB_CAIRO_VAR VALUE rb_cCairo_Context;
@@ -163,6 +163,7 @@ RB_CAIRO_VAR VALUE rb_mCairo_MimeType;
163
163
  RB_CAIRO_VAR VALUE rb_mCairo_RegionOverlap;
164
164
  RB_CAIRO_VAR VALUE rb_mCairo_PDFOutlineFlags;
165
165
  RB_CAIRO_VAR VALUE rb_mCairo_PDFMetadata;
166
+ RB_CAIRO_VAR VALUE rb_mCairo_SVGUnit;
166
167
  RB_CAIRO_VAR VALUE rb_mCairo_Color;
167
168
  RB_CAIRO_VAR VALUE rb_cCairo_Color_Base;
168
169
  RB_CAIRO_VAR VALUE rb_cCairo_Paper;
@@ -305,6 +306,9 @@ VALUE rb_cairo_device_to_ruby_object (cairo_device_t *de
305
306
  #define RVAL2CRPDFOUTLINEFLAGS(obj) (rb_cairo_pdf_outline_flags_from_ruby_object(obj))
306
307
  #define RVAL2CRPDFMETADATA(obj) (rb_cairo_pdf_metadata_from_ruby_object(obj))
307
308
  #endif
309
+ #if CAIRO_CHECK_VERSION(1, 15, 10)
310
+ #define RVAL2CRSVGUNIT(obj) (rb_cairo_svg_unit_from_ruby_object(obj))
311
+ #endif
308
312
 
309
313
  cairo_operator_t rb_cairo_operator_from_ruby_object (VALUE obj);
310
314
  cairo_antialias_t rb_cairo_antialias_from_ruby_object (VALUE obj);
@@ -347,6 +351,9 @@ cairo_region_overlap_t rb_cairo_region_overlap_from_ruby_object(VALUE obj);
347
351
  cairo_pdf_outline_flags_t rb_cairo_pdf_outline_flags_from_ruby_object(VALUE obj);
348
352
  cairo_pdf_metadata_t rb_cairo_pdf_metadata_from_ruby_object(VALUE obj);
349
353
  #endif
354
+ #if CAIRO_CHECK_VERSION(1, 15, 10)
355
+ cairo_svg_unit_t rb_cairo_svg_unit_from_ruby_object(VALUE obj);
356
+ #endif
350
357
 
351
358
  void rb_cairo_check_status (cairo_status_t status);
352
359
  void rb_cairo_surface_check_status (cairo_surface_t *surface);
@@ -41,6 +41,7 @@ VALUE rb_mCairo_MimeType = Qnil;
41
41
  VALUE rb_mCairo_RegionOverlap = Qnil;
42
42
  VALUE rb_mCairo_PDFOutlineFlags = Qnil;
43
43
  VALUE rb_mCairo_PDFMetadata = Qnil;
44
+ VALUE rb_mCairo_SVGUnit = Qnil;
44
45
 
45
46
  #define CAIRO_OPERATOR_MIN CAIRO_OPERATOR_CLEAR
46
47
  #if CAIRO_CHECK_VERSION(1, 10, 0)
@@ -138,6 +139,9 @@ VALUE rb_mCairo_PDFMetadata = Qnil;
138
139
  #define CAIRO_PDF_METADATA_MIN CAIRO_PDF_METADATA_TITLE
139
140
  #define CAIRO_PDF_METADATA_MAX CAIRO_PDF_METADATA_MOD_DATE
140
141
 
142
+ #define CAIRO_SVG_UNIT_MIN CAIRO_SVG_UNIT_USER
143
+ #define CAIRO_SVG_UNIT_MAX CAIRO_SVG_UNIT_PERCENT
144
+
141
145
  #define DEFINE_RVAL2ENUM(name, const_name) \
142
146
  cairo_ ## name ## _t \
143
147
  rb_cairo_ ## name ## _from_ruby_object (VALUE rb_ ## name) \
@@ -212,6 +216,10 @@ DEFINE_RVAL2ENUM(pdf_outline_flags, PDF_OUTLINE_FLAGS)
212
216
  DEFINE_RVAL2ENUM(pdf_metadata, PDF_METADATA)
213
217
  #endif
214
218
 
219
+ #if CAIRO_CHECK_VERSION(1, 15, 10)
220
+ DEFINE_RVAL2ENUM(svg_unit, SVG_UNIT)
221
+ #endif
222
+
215
223
  #if defined(RB_CAIRO_PLATFORM_WIN32) && !defined(PS_LEVEL_ENUM_DEFINED)
216
224
  void
217
225
  rb_cairo_ps_level_from_ruby_object (VALUE rb_ps_level)
@@ -677,6 +685,16 @@ Init_cairo_constants (void)
677
685
  rb_define_const (rb_mCairo_MimeType, "JBIG2_GLOBAL_ID",
678
686
  rb_str_new2 (CAIRO_MIME_TYPE_JBIG2_GLOBAL_ID));
679
687
  #endif
688
+ #if CAIRO_CHECK_VERSION(1, 15, 10)
689
+ rb_define_const (rb_mCairo_MimeType, "CCITT_FAX",
690
+ rb_str_new_cstr (CAIRO_MIME_TYPE_CCITT_FAX));
691
+ rb_define_const (rb_mCairo_MimeType, "CCITT_FAX_PARAMS",
692
+ rb_str_new_cstr (CAIRO_MIME_TYPE_CCITT_FAX_PARAMS));
693
+ rb_define_const (rb_mCairo_MimeType, "EPS",
694
+ rb_str_new_cstr (CAIRO_MIME_TYPE_EPS));
695
+ rb_define_const (rb_mCairo_MimeType, "EPS_PARAMS",
696
+ rb_str_new_cstr (CAIRO_MIME_TYPE_EPS_PARAMS));
697
+ #endif
680
698
 
681
699
  #if CAIRO_CHECK_VERSION(1, 10, 0)
682
700
  rb_mCairo_RegionOverlap = rb_define_module_under (rb_mCairo, "RegionOverlap");
@@ -725,4 +743,29 @@ Init_cairo_constants (void)
725
743
  rb_define_const (rb_mCairo_PDFMetadata, "MOD_DATE",
726
744
  INT2NUM (CAIRO_PDF_METADATA_MOD_DATE));
727
745
  #endif
746
+
747
+ #if CAIRO_CHECK_VERSION(1, 15, 10)
748
+ rb_mCairo_SVGUnit =
749
+ rb_define_module_under (rb_mCairo, "SVGUnit");
750
+ rb_define_const (rb_mCairo_SVGUnit, "USER",
751
+ INT2NUM (CAIRO_SVG_UNIT_USER));
752
+ rb_define_const (rb_mCairo_SVGUnit, "EM",
753
+ INT2NUM (CAIRO_SVG_UNIT_EM));
754
+ rb_define_const (rb_mCairo_SVGUnit, "EX",
755
+ INT2NUM (CAIRO_SVG_UNIT_EX));
756
+ rb_define_const (rb_mCairo_SVGUnit, "PX",
757
+ INT2NUM (CAIRO_SVG_UNIT_PX));
758
+ rb_define_const (rb_mCairo_SVGUnit, "IN",
759
+ INT2NUM (CAIRO_SVG_UNIT_IN));
760
+ rb_define_const (rb_mCairo_SVGUnit, "CM",
761
+ INT2NUM (CAIRO_SVG_UNIT_CM));
762
+ rb_define_const (rb_mCairo_SVGUnit, "MM",
763
+ INT2NUM (CAIRO_SVG_UNIT_MM));
764
+ rb_define_const (rb_mCairo_SVGUnit, "PT",
765
+ INT2NUM (CAIRO_SVG_UNIT_PT));
766
+ rb_define_const (rb_mCairo_SVGUnit, "PC",
767
+ INT2NUM (CAIRO_SVG_UNIT_PC));
768
+ rb_define_const (rb_mCairo_SVGUnit, "PERCENT",
769
+ INT2NUM (CAIRO_SVG_UNIT_PERCENT));
770
+ #endif
728
771
  }
@@ -1443,7 +1443,7 @@ cr_win32_surface_initialize (int argc, VALUE *argv, VALUE self)
1443
1443
  format = arg2;
1444
1444
  width = arg3;
1445
1445
  height = arg4;
1446
- win32_hdc = NIL_P (hdc) ? NULL : (HDC) NUM2UINT (hdc);
1446
+ win32_hdc = NIL_P (hdc) ? NULL : (HDC) (UINT_PTR) NUM2UINT (hdc);
1447
1447
  surface = cairo_win32_surface_create_with_ddb (win32_hdc,
1448
1448
  RVAL2CRFORMAT (format),
1449
1449
  NUM2INT (width),
@@ -1504,6 +1504,27 @@ cr_svg_surface_restrict_to_version (VALUE self, VALUE version)
1504
1504
  rb_cairo_surface_check_status (_SELF);
1505
1505
  return Qnil;
1506
1506
  }
1507
+
1508
+ # if CAIRO_CHECK_VERSION(1, 15, 10)
1509
+ static VALUE
1510
+ cr_svg_surface_get_document_unit (VALUE self)
1511
+ {
1512
+ cairo_svg_unit_t unit;
1513
+ unit = cairo_svg_surface_get_document_unit (_SELF);
1514
+ rb_cairo_surface_check_status (_SELF);
1515
+ return INT2NUM (unit);
1516
+ }
1517
+
1518
+ static VALUE
1519
+ cr_svg_surface_set_document_unit (VALUE self, VALUE rb_unit)
1520
+ {
1521
+ cairo_svg_unit_t unit;
1522
+ unit = RVAL2CRSVGUNIT (rb_unit);
1523
+ cairo_svg_surface_set_document_unit (_SELF, unit);
1524
+ rb_cairo_surface_check_status (_SELF);
1525
+ return Qnil;
1526
+ }
1527
+ # endif
1507
1528
  #endif
1508
1529
 
1509
1530
  #ifdef RB_CAIRO_HAS_WIN32_PRINTING_SURFACE
@@ -2180,6 +2201,12 @@ Init_cairo_surface (void)
2180
2201
  cr_svg_surface_initialize, -1);
2181
2202
  rb_define_method (rb_cCairo_SVGSurface, "restrict_to_version",
2182
2203
  cr_svg_surface_restrict_to_version, 1);
2204
+ # if CAIRO_CHECK_VERSION(1, 15, 10)
2205
+ rb_define_method (rb_cCairo_SVGSurface, "document_unit",
2206
+ cr_svg_surface_get_document_unit, 0);
2207
+ rb_define_method (rb_cCairo_SVGSurface, "set_document_unit",
2208
+ cr_svg_surface_set_document_unit, 1);
2209
+ # endif
2183
2210
 
2184
2211
  RB_CAIRO_DEF_SETTERS (rb_cCairo_SVGSurface);
2185
2212
  #endif
@@ -25,11 +25,11 @@ class PDFSurfaceTest < Test::Unit::TestCase
25
25
  end
26
26
  id = surface.add_outline(Cairo::PDFOutline::ROOT,
27
27
  "top-level",
28
- "destination",
28
+ "dest='destination'",
29
29
  Cairo::PDFOutlineFlags::OPEN)
30
30
  sub_id = surface.add_outline(sub_id,
31
31
  "sub",
32
- "destination",
32
+ "dest='destination'",
33
33
  Cairo::PDFOutlineFlags::OPEN)
34
34
  assert_equal(2, sub_id)
35
35
  end
@@ -15,6 +15,10 @@ class RecordingSurfaceTest < Test::Unit::TestCase
15
15
  context.line_to(80, 100)
16
16
  context.stroke
17
17
  end
18
- assert_equal([10.0, 20.0, 61.0, 61.0], surface.ink_extents)
18
+ if Cairo.satisfied_version?(1, 15)
19
+ assert_equal([14.0, 29.0, 67.0, 72.0], surface.ink_extents)
20
+ else
21
+ assert_equal([10.0, 20.0, 61.0, 61.0], surface.ink_extents)
22
+ end
19
23
  end
20
24
  end
@@ -5,4 +5,13 @@ class SVGSurfaceTest < Test::Unit::TestCase
5
5
  surface = Cairo::SVGSurface.new(nil, 10, 20)
6
6
  surface.finish
7
7
  end
8
+
9
+ def test_unit
10
+ only_cairo_version(1, 15, 10)
11
+ output = StringIO.new
12
+ surface = Cairo::SVGSurface.new(output, 10, 20)
13
+ assert_equal(Cairo::SVGUnit::PT, surface.document_unit)
14
+ surface.document_unit = Cairo::SVGUnit::CM
15
+ assert_equal(Cairo::SVGUnit::CM, surface.document_unit)
16
+ end
8
17
  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.15.10
4
+ version: 1.15.11
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kouhei Sutou
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-10-15 00:00:00.000000000 Z
11
+ date: 2017-12-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: pkg-config