cairo 1.14.2 → 1.14.3

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: d0773e780836adfd202d91fbb4a1bfde4efd58af
4
- data.tar.gz: 01bcd8c5a152a49903bd74149c822bb5dd70f50c
3
+ metadata.gz: 5d6352c8474409a3dc77b667c482f645d9f6eb6e
4
+ data.tar.gz: 3a756185b5816b5a8c11951835fc7cb5115ffd70
5
5
  SHA512:
6
- metadata.gz: e8e1d7d8ff8b80736801e4eb70cec7e74295983626cee2511b642c81d1072337cc0a45b2b1095f4e74f9fa96f93da9b6aa7d7e4486a7b4c618e8a2fa270c13e5
7
- data.tar.gz: 7d7d46709d0d4d097ea7361c1dbb5a4cb2f15f93818706b6a12720f14cac237a41f7b3db54cd65efd36225a04498753e0a5adb1fd061f3cdb8a161378cb919fb
6
+ metadata.gz: 08c3ee47ccb9e4ca12d9577f51ec49028581151576c5f83711fa9d4564832bcb89f501b7e557147d5a795856dedb25bf11356858419bb55c24554dce8226ce75
7
+ data.tar.gz: 81828f7139acf3d451aed3f3f95ee50343d289e1a21320be756e236e61364a8d1a8914cbadc409cba43901f28e790cd1363b3a6f3a8c5c6e42da93c90a18abe5
data/NEWS CHANGED
@@ -1,3 +1,17 @@
1
+ Release 1.14.3 (2015-09-08) Kouhei Sutou <kou@cozmixng.org>
2
+ ===========================================================
3
+
4
+ Fixes
5
+ -----
6
+
7
+ * Fixed run-time error on OS X.
8
+ [shocker-ja:1270][Reported by Junichi Oya]
9
+
10
+ Thanks
11
+ ------
12
+
13
+ * Junichi Oya
14
+
1
15
  Release 1.14.2 (2015-09-06) Kouhei Sutou <kou@cozmixng.org>
2
16
  ===========================================================
3
17
 
data/Rakefile CHANGED
@@ -527,13 +527,25 @@ windows_task.define
527
527
 
528
528
  namespace :vm do
529
529
  namespace :windows do
530
- desc "Build all packages for Windows in VM"
531
- task :build do
532
- cd("build") do
533
- sh("vagrant", "destroy", "--force")
534
- sh("vagrant", "up")
530
+ architectures = ["32", "64"]
531
+ build_tasks = []
532
+
533
+ namespace :build do
534
+ architectures.each do |architecture|
535
+ desc "Build all packages for Windows #{architecture}"
536
+ task_name = "win#{architecture}"
537
+ build_tasks << task_name
538
+ task task_name do
539
+ cd("build") do
540
+ sh("vagrant", "destroy", "--force", task_name)
541
+ sh("vagrant", "up", task_name)
542
+ end
543
+ end
535
544
  end
536
545
  end
546
+
547
+ desc "Build all packages for Windows"
548
+ task :build => build_tasks
537
549
  end
538
550
  end
539
551
 
@@ -199,8 +199,6 @@ checking_for(checking_message("Mac OS X")) do
199
199
  end
200
200
  true
201
201
  else
202
- MakeMakefile::C_EXT.delete("m")
203
- MakeMakefile::SRC_EXT.delete("m")
204
202
  false
205
203
  end
206
204
  end
@@ -99,9 +99,7 @@ Init_cairo ()
99
99
  Init_cairo_region ();
100
100
  Init_cairo_device ();
101
101
  Init_cairo_surface ();
102
- #ifdef CAIRO_HAS_QUARTZ_SURFACE
103
102
  Init_cairo_quartz_surface ();
104
- #endif
105
103
  Init_cairo_exception ();
106
104
  Init_cairo_font ();
107
105
  Init_cairo_font_extents ();
@@ -5,7 +5,7 @@
5
5
  * $Author: kou $
6
6
  * $Date: 2008-09-19 12:56:27 $
7
7
  *
8
- * Copyright 2006-2014 Kouhei Sutou <kou@cozmixng.org>
8
+ * Copyright 2006-2015 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 2
76
+ #define RB_CAIRO_VERSION_MICRO 3
77
77
 
78
78
  RB_CAIRO_VAR VALUE rb_mCairo;
79
79
  RB_CAIRO_VAR VALUE rb_cCairo_Context;
@@ -0,0 +1,207 @@
1
+ /* -*- mode: objc; c-file-style: "gnu"; indent-tabs-mode: nil -*- */
2
+ /*
3
+ * Ruby Cairo Binding
4
+ *
5
+ * Copyright 2008-2015 Kouhei Sutou <kou@cozmixng.org>
6
+ * Copyright 2014 Patrick Hanevold <patrick.hanevold@gmail.com>
7
+ *
8
+ * This file is made available under the same terms as Ruby
9
+ *
10
+ */
11
+
12
+ #include "rb_cairo.h"
13
+ #include "rb_cairo_private.h"
14
+
15
+ #if CAIRO_CHECK_VERSION(1, 5, 12)
16
+ # define RB_CAIRO_HAS_QUARTZ_IMAGE_SURFACE_TYPE
17
+ #endif
18
+
19
+ #ifdef CAIRO_HAS_QUARTZ_SURFACE
20
+ # ifndef HAVE_TYPE_ENUM_RUBY_VALUE_TYPE
21
+ enum ruby_value_type {
22
+ RUBY_T_DATA = T_DATA
23
+ };
24
+ # endif
25
+ # undef T_DATA
26
+ # include <cairo-quartz.h>
27
+ # define T_DATA RUBY_T_DATA
28
+ # define RB_CAIRO_HAS_QUARTZ_SURFACE
29
+ # ifdef CAIRO_HAS_QUARTZ_IMAGE_SURFACE
30
+ # include <cairo-quartz-image.h>
31
+ # define RB_CAIRO_HAS_QUARTZ_IMAGE_SURFACE
32
+ # endif
33
+ #endif
34
+
35
+ #define _SELF (RVAL2CRSURFACE(self))
36
+
37
+ #ifdef RB_CAIRO_HAS_QUARTZ_SURFACE
38
+ /* Quartz-surface functions */
39
+ #include <objc/objc-runtime.h>
40
+
41
+ # ifdef HAVE_RUBY_COCOA
42
+ BOOL rbobj_to_nsobj (VALUE obj, id* nsobj);
43
+ VALUE ocid_to_rbobj (VALUE context_obj, id ocid);
44
+ # endif
45
+
46
+ static VALUE
47
+ cr_quartz_surface_initialize (int argc, VALUE *argv, VALUE self)
48
+ {
49
+ id objc_object = nil;
50
+ CGContextRef context;
51
+ unsigned int width, height;
52
+ cairo_surface_t *surface = NULL;
53
+ cairo_format_t format = CAIRO_FORMAT_ARGB32;
54
+ VALUE arg1, arg2, arg3, rb_width, rb_height;
55
+ # ifdef HAVE_RUBY_COCOA
56
+ static VALUE rb_cOSXCGContextRef = Qnil;
57
+ # endif
58
+
59
+ rb_scan_args (argc, argv, "21", &arg1, &arg2, &arg3);
60
+
61
+ if (argc == 2)
62
+ {
63
+ rb_width = arg1;
64
+ rb_height = arg2;
65
+ }
66
+ else
67
+ {
68
+ switch (TYPE (arg1))
69
+ {
70
+ case T_NIL:
71
+ break;
72
+ case T_STRING:
73
+ case T_SYMBOL:
74
+ case T_FIXNUM:
75
+ format = RVAL2CRFORMAT (arg1);
76
+ break;
77
+ default:
78
+ # ifdef HAVE_RUBY_COCOA
79
+ if (NIL_P (rb_cOSXCGContextRef))
80
+ rb_cOSXCGContextRef =
81
+ rb_const_get (rb_const_get (rb_cObject, rb_intern ("OSX")),
82
+ rb_intern ("CGContextRef"));
83
+ # endif
84
+
85
+ # ifdef HAVE_RUBY_COCOA
86
+ if (RTEST (rb_obj_is_kind_of (arg1, rb_cOSXCGContextRef)))
87
+ {
88
+ rbobj_to_nsobj (arg1, &objc_object);
89
+ }
90
+ else
91
+ # endif
92
+ {
93
+ if (!NIL_P (rb_cairo__cFFIPointer) &&
94
+ RTEST (rb_obj_is_kind_of (arg1, rb_cairo__cFFIPointer)))
95
+ {
96
+ VALUE rb_objc_pointer;
97
+ rb_objc_pointer = rb_funcall (arg1,
98
+ rb_intern ("address"),
99
+ 0);
100
+ objc_object = (id) NUM2ULONG (rb_objc_pointer);
101
+ }
102
+ else
103
+ {
104
+ rb_raise (rb_eArgError,
105
+ "invalid argument (expect "
106
+ "(width, height), "
107
+ "(format, width, height), "
108
+ "(cg_context, width, height) or "
109
+ "(ffi_pointer, width, height)): %s",
110
+ rb_cairo__inspect (rb_ary_new3 (3, arg1, arg2, arg3)));
111
+ }
112
+ }
113
+ break;
114
+ }
115
+
116
+ rb_width = arg2;
117
+ rb_height = arg3;
118
+ }
119
+
120
+ width = NUM2UINT (rb_width);
121
+ height = NUM2UINT (rb_height);
122
+
123
+ if (objc_object == nil)
124
+ {
125
+ surface = cairo_quartz_surface_create (format, width, height);
126
+ }
127
+ else
128
+ {
129
+ context = (CGContextRef)objc_object;
130
+ surface =
131
+ cairo_quartz_surface_create_for_cg_context (context, width, height);
132
+ }
133
+
134
+ rb_cairo_surface_check_status (surface);
135
+ DATA_PTR (self) = surface;
136
+ if (rb_block_given_p ())
137
+ rb_cairo__surface_yield_and_finish (self);
138
+ return Qnil;
139
+ }
140
+
141
+ static VALUE
142
+ cr_quartz_surface_get_cg_context (VALUE self)
143
+ {
144
+ # ifdef HAVE_RUBY_COCOA
145
+ CGContextRef context;
146
+ id objc_object;
147
+
148
+ context = cairo_quartz_surface_get_cg_context (_SELF);
149
+ objc_object = (id)context;
150
+ return ocid_to_rbobj (Qnil, objc_object);
151
+ # else
152
+ rb_raise (rb_eNotImpError,
153
+ "%s#cg_context requires RubyCocoa",
154
+ rb_obj_classname(self));
155
+ return Qnil;
156
+ # endif
157
+ }
158
+ #endif
159
+
160
+ #ifdef RB_CAIRO_HAS_QUARTZ_IMAGE_SURFACE
161
+
162
+ /* Quartz image surface functions */
163
+ static VALUE
164
+ cr_quartz_image_surface_initialize (VALUE self, VALUE image_surface)
165
+ {
166
+ cairo_surface_t *surface;
167
+
168
+ surface = cairo_quartz_image_surface_create (RVAL2CRSURFACE (image_surface));
169
+ rb_cairo_surface_check_status (surface);
170
+ DATA_PTR (self) = surface;
171
+ if (rb_block_given_p ())
172
+ rb_cairo__surface_yield_and_finish (self);
173
+ return Qnil;
174
+ }
175
+
176
+ static VALUE
177
+ cr_quartz_image_surface_get_image (VALUE self)
178
+ {
179
+ cairo_surface_t *surface;
180
+
181
+ surface = cairo_quartz_image_surface_get_image (_SELF);
182
+ if (!surface)
183
+ return Qnil;
184
+ rb_cairo_surface_check_status (surface);
185
+ return CRSURFACE2RVAL (surface);
186
+ }
187
+ #endif
188
+
189
+ void
190
+ Init_cairo_quartz_surface (void)
191
+ {
192
+ /* Quartz surface */
193
+ #ifdef RB_CAIRO_HAS_QUARTZ_SURFACE
194
+ rb_define_method (rb_cCairo_QuartzSurface, "initialize",
195
+ cr_quartz_surface_initialize, -1);
196
+ rb_define_method (rb_cCairo_QuartzSurface, "cg_context",
197
+ cr_quartz_surface_get_cg_context, 0);
198
+ #endif
199
+
200
+ /* Quartz image surface */
201
+ #ifdef RB_CAIRO_HAS_QUARTZ_IMAGE_SURFACE
202
+ rb_define_method (rb_cCairo_QuartzImageSurface, "initialize",
203
+ cr_quartz_image_surface_initialize, 1);
204
+ rb_define_method (rb_cCairo_QuartzImageSurface, "image",
205
+ cr_quartz_image_surface_get_image, 0);
206
+ #endif
207
+ }
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.2
4
+ version: 1.14.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kouhei Sutou
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-09-06 00:00:00.000000000 Z
11
+ date: 2015-09-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: pkg-config
@@ -116,6 +116,7 @@ files:
116
116
  - ext/cairo/rb_cairo_pattern.c
117
117
  - ext/cairo/rb_cairo_private.c
118
118
  - ext/cairo/rb_cairo_private.h
119
+ - ext/cairo/rb_cairo_quartz_surface.c
119
120
  - ext/cairo/rb_cairo_rectangle.c
120
121
  - ext/cairo/rb_cairo_region.c
121
122
  - ext/cairo/rb_cairo_scaled_font.c
@@ -200,29 +201,29 @@ signing_key:
200
201
  specification_version: 4
201
202
  summary: Ruby bindings for cairo
202
203
  test_files:
203
- - test/test_text_extents.rb
204
- - test/test_font_face.rb
205
- - test/test_region.rb
206
- - test/test_exception.rb
207
- - test/test_font_extents.rb
208
- - test/test_scaled_font.rb
209
- - test/test_paper.rb
210
- - test/test_tee_surface.rb
211
- - test/test_text_to_glyphs_data.rb
212
- - test/test_constants.rb
213
- - test/test_script_surface.rb
214
- - test/run-test.rb
215
- - test/test_xml_device.rb
216
- - test/test_recording_surface.rb
217
- - test/test_color.rb
204
+ - test/test_context.rb
218
205
  - test/test_surface.rb
206
+ - test/test_constants.rb
219
207
  - test/test_text_cluster.rb
220
208
  - test/cairo-test-utils.rb
209
+ - test/test_script_surface.rb
210
+ - test/test_color.rb
211
+ - test/test_text_extents.rb
221
212
  - test/test_quartz_image_surface.rb
222
- - test/test_font_options.rb
223
- - test/test_context.rb
213
+ - test/test_paper.rb
214
+ - test/test_raster_source_pattern.rb
215
+ - test/test_region.rb
224
216
  - test/test_script_device.rb
217
+ - test/test_font_face.rb
218
+ - test/test_recording_surface.rb
219
+ - test/test_scaled_font.rb
225
220
  - test/test_xml_surface.rb
226
- - test/test_raster_source_pattern.rb
221
+ - test/run-test.rb
227
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
+ - test/test_exception.rb
228
+ - test/test_text_to_glyphs_data.rb
228
229
  has_rdoc: