rmagick 2.0.0 → 2.1.0

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of rmagick might be problematic. Click here for more details.

Files changed (54) hide show
  1. data/ChangeLog +9 -0
  2. data/README.html +13 -13
  3. data/README.txt +11 -11
  4. data/doc/comtasks.html +25 -4
  5. data/doc/constants.html +8 -8
  6. data/doc/draw.html +112 -116
  7. data/doc/ex/axes.rb +1 -1
  8. data/doc/ex/clip_path.rb +5 -4
  9. data/doc/ex/get_type_metrics.rb +2 -2
  10. data/doc/ex/resize_to_fill.rb +10 -0
  11. data/doc/ex/{crop_resized.rb → resize_to_fit.rb} +2 -2
  12. data/doc/ilist.html +79 -82
  13. data/doc/image1.html +213 -322
  14. data/doc/image2.html +123 -136
  15. data/doc/image3.html +340 -198
  16. data/doc/imageattrs.html +211 -192
  17. data/doc/imusage.html +6 -7
  18. data/doc/index.html +9 -16
  19. data/doc/info.html +90 -61
  20. data/doc/magick.html +6 -6
  21. data/doc/optequiv.html +26 -13
  22. data/doc/rvg.html +22 -23
  23. data/doc/rvgclip.html +15 -16
  24. data/doc/rvggroup.html +23 -23
  25. data/doc/rvgimage.html +18 -19
  26. data/doc/rvgpattern.html +101 -82
  27. data/doc/rvgshape.html +14 -21
  28. data/doc/rvgstyle.html +4 -4
  29. data/doc/rvgtext.html +10 -9
  30. data/doc/rvgtspan.html +12 -11
  31. data/doc/rvgtut.html +4 -4
  32. data/doc/rvguse.html +4 -4
  33. data/doc/rvgxform.html +9 -9
  34. data/doc/struct.html +193 -195
  35. data/doc/usage.html +12 -10
  36. data/examples/constitute.rb +7 -0
  37. data/ext/RMagick/MANIFEST +4 -4
  38. data/ext/RMagick/extconf.rb +54 -42
  39. data/ext/RMagick/rmagick.h +34 -11
  40. data/ext/RMagick/rmdraw.c +6 -6
  41. data/ext/RMagick/rmfill.c +2 -2
  42. data/ext/RMagick/rmilist.c +9 -9
  43. data/ext/RMagick/rmimage.c +110 -106
  44. data/ext/RMagick/rminfo.c +33 -14
  45. data/ext/RMagick/rmmain.c +11 -21
  46. data/ext/RMagick/rmutil.c +51 -11
  47. data/lib/RMagick.rb +25 -18
  48. data/post-clean.rb +3 -3
  49. data/post-install.rb +4 -5
  50. data/rmagick.gemspec +5 -3
  51. data/uninstall.rb +6 -6
  52. metadata +7 -7
  53. data/doc/ex/Adispatch.rb +0 -43
  54. data/doc/ex/Zconstitute.rb +0 -9
data/doc/usage.html CHANGED
@@ -6,7 +6,7 @@
6
6
  <meta name="generator" content=
7
7
  "HTML Tidy for Linux/x86 (vers 1 September 2005), see www.w3.org" />
8
8
 
9
- <title>RMagick 2.0.0: How to use RMagick</title>
9
+ <title>RMagick 2.1.0: How to use RMagick</title>
10
10
  <meta http-equiv="Content-Type" content=
11
11
  "text/html; charset=us-ascii" />
12
12
  <meta name="GENERATOR" content="Quanta Plus" />
@@ -90,7 +90,7 @@
90
90
  </head>
91
91
 
92
92
  <body>
93
- <h6 id="header">RMagick 2.0.0 User's Guide and Reference</h6>
93
+ <h6 id="header">RMagick 2.1.0 User's Guide and Reference</h6>
94
94
 
95
95
  <div class="nav">
96
96
  &laquo;&nbsp;<a href="index.html">Prev</a> | <a href=
@@ -658,10 +658,6 @@ exit
658
658
 
659
659
  <dd>Compute a new constrained size for the image</dd>
660
660
 
661
- <dt><a href="image1.html#crop_resized">crop_resized</a></dt>
662
-
663
- <dd>Resize and crop while retaining the aspect ratio</dd>
664
-
665
661
  <dt><a href="image2.html#magnify">magnify</a></dt>
666
662
 
667
663
  <dd>Double the size of the image</dd>
@@ -679,6 +675,11 @@ exit
679
675
 
680
676
  <dd>Resize the image using a filter</dd>
681
677
 
678
+ <dt><a href=
679
+ "image1.html#resize_to_fill">resize_to_fill</a></dt>
680
+
681
+ <dd>Resize and crop while retaining the aspect ratio</dd>
682
+
682
683
  <dt><a href=
683
684
  "image3.html#resize_to_fit">resize_to_fit</a></dt>
684
685
 
@@ -892,10 +893,6 @@ exit
892
893
 
893
894
  <dd>Extract a region from the image</dd>
894
895
 
895
- <dt><a href="image1.html#crop_resized">crop_resized</a></dt>
896
-
897
- <dd>Resize and crop while retaining the aspect ratio</dd>
898
-
899
896
  <dt class="ilist"><a href=
900
897
  "ilist.html#deconstruct">deconstruct</a></dt>
901
898
 
@@ -927,6 +924,11 @@ exit
927
924
 
928
925
  <dd class="ilist">Optimize or compare image layers</dd>
929
926
 
927
+ <dt><a href=
928
+ "image1.html#resize_to_fill">resize_to_fill</a></dt>
929
+
930
+ <dd>Resize and crop while retaining the aspect ratio</dd>
931
+
930
932
  <dt><a href="image3.html#roll">roll</a></dt>
931
933
 
932
934
  <dd>Offset the image</dd>
@@ -0,0 +1,7 @@
1
+ #! /usr/local/bin/ruby -w
2
+ require 'RMagick'
3
+
4
+ f = Magick::Image.read("../doc/ex/images/Flower_Hat.jpg").first
5
+ pixels = f.dispatch(0,0,f.columns, f.rows, "RGB")
6
+ image = Magick::Image.constitute(f.columns, f.rows, "RGB", pixels)
7
+ image.write("constitute.miff")
data/ext/RMagick/MANIFEST CHANGED
@@ -1,4 +1,4 @@
1
- MANIFEST for RMagick-2.0.0 - 09:19:16 12/27/07
1
+ MANIFEST for RMagick-2.1.0 - 18:13:00 01/09/08
2
2
 
3
3
  doc/ilist.html
4
4
  doc/scripts/stripeTables.js
@@ -9,6 +9,7 @@ doc/comtasks.html
9
9
  doc/ex/color_reset.rb
10
10
  doc/ex/rubyname.rb
11
11
  doc/ex/clip_path.rb
12
+ doc/ex/resize_to_fill.rb
12
13
  doc/ex/grav.rb
13
14
  doc/ex/Skew.rb
14
15
  doc/ex/ViewBox.rb
@@ -117,7 +118,6 @@ doc/ex/stroke_width.rb
117
118
  doc/ex/polygon01.rb
118
119
  doc/ex/matte_replace.rb
119
120
  doc/ex/NewCoordSys.rb
120
- doc/ex/Zconstitute.rb
121
121
  doc/ex/get_multiline_type_metrics.rb
122
122
  doc/ex/edge.rb
123
123
  doc/ex/modulate.rb
@@ -131,7 +131,6 @@ doc/ex/cbezier4.rb
131
131
  doc/ex/affine_transform.rb
132
132
  doc/ex/arcs02.rb
133
133
  doc/ex/shadow.rb
134
- doc/ex/crop_resized.rb
135
134
  doc/ex/preview.rb
136
135
  doc/ex/cbezier3.rb
137
136
  doc/ex/ellipse.rb
@@ -211,6 +210,7 @@ doc/ex/color_floodfill.rb
211
210
  doc/ex/random_threshold_channel.rb
212
211
  doc/ex/shade.rb
213
212
  doc/ex/rotate_f.rb
213
+ doc/ex/resize_to_fit.rb
214
214
  doc/ex/PreserveAspectRatio.rb
215
215
  doc/ex/spread.rb
216
216
  doc/ex/polyline01.rb
@@ -231,7 +231,6 @@ doc/ex/text01.rb
231
231
  doc/ex/crop.rb
232
232
  doc/ex/quantize-m.rb
233
233
  doc/ex/translate.rb
234
- doc/ex/Adispatch.rb
235
234
  doc/ex/colors.rb
236
235
  doc/ex/enhance.rb
237
236
  doc/ex/tspan01.rb
@@ -312,6 +311,7 @@ examples/pattern_fill.rb
312
311
  examples/identify.rb
313
312
  examples/histogram.rb
314
313
  examples/demo.rb
314
+ examples/constitute.rb
315
315
  examples/import_export.rb
316
316
  examples/vignette.rb
317
317
  examples/image_opacity.rb
@@ -13,7 +13,7 @@ SUMMARY = <<"END_SUMMARY"
13
13
  #{"=" * 70}
14
14
  #{DateTime.now.strftime("%a %d%b%y %T")}
15
15
  This installation of RMagick #{RMAGICK_VERS} is configured
16
- for Ruby #{RUBY_VERSION} (#{RUBY_PLATFORM}) and ImageMagick #{`Magick-config --version`.chomp}.
16
+ for Ruby #{RUBY_VERSION} (#{RUBY_PLATFORM}) and ImageMagick 6.3.7.
17
17
  #{"=" * 70}
18
18
 
19
19
 
@@ -88,37 +88,54 @@ end
88
88
  end
89
89
 
90
90
 
91
- # Check for Magick-config
92
- unless find_executable("Magick-config")
93
- exit_failure "Can't install RMagick #{RMAGICK_VERS}. Can't find Magick-config in #{ENV['PATH']}\n"
94
- end
95
91
 
92
+ # Magick-config is not available on Windows
93
+ if RUBY_PLATFORM !~ /mswin/
94
+ # Check for Magick-config
95
+ unless find_executable("Magick-config")
96
+ exit_failure "Can't install RMagick #{RMAGICK_VERS}. Can't find Magick-config in #{ENV['PATH']}\n"
97
+ end
96
98
 
97
- # Ensure minimum ImageMagick version
98
- unless checking_for("ImageMagick version >= #{MIN_IM_VERS}") do
99
- version = `Magick-config --version`.chomp.tr(".","").to_i
100
- version >= MIN_IM_VERS_NO
101
- end
102
- exit_failure "Can't install RMagick #{RMAGICK_VERS}. You must have ImageMagick #{MIN_IM_VERS} or later.\n"
103
- end
99
+ # Ensure minimum ImageMagick version
100
+ unless checking_for("ImageMagick version >= #{MIN_IM_VERS}") do
101
+ version = `Magick-config --version`.chomp.tr(".","").to_i
102
+ version >= MIN_IM_VERS_NO
103
+ end
104
+ exit_failure "Can't install RMagick #{RMAGICK_VERS}. You must have ImageMagick #{MIN_IM_VERS} or later.\n"
105
+ end
106
+
107
+ # Ensure ImageMagick is not configured for HDRI
108
+ unless checking_for("HDRI disabled version of ImageMagick") do
109
+ not (`Magick-config --version`["HDRI"])
110
+ end
111
+ exit_failure "\nCan't install RMagick #{RMAGICK_VERS}."+
112
+ "\nRMagick does not work when ImageMagick is configured for High Dynamic Range Images."+
113
+ "\nDon't use the --enable-hdri option when configuring ImageMagick.\n"
114
+ end
115
+
116
+ # Save flags
117
+ $CFLAGS = ENV["CFLAGS"].to_s + " " + `Magick-config --cflags`.chomp
118
+ $CPPFLAGS = `Magick-config --cppflags`.chomp
119
+ $LDFLAGS = `Magick-config --ldflags`.chomp
120
+ $LOCAL_LIBS = `Magick-config --libs`.chomp
121
+
122
+ else # mswin
123
+
124
+ `convert -version` =~ /Version: ImageMagick (\d\.\d\.\d+) /
125
+ abort "Unable to get ImageMagick version" unless $1
126
+ $CFLAGS = "-W3"
127
+ $CPPFLAGS = %Q{-I"C:\\Program Files\\Microsoft Platform SDK for Windows Server 2003 R2\\Include" -I"C:\\Program Files\\ImageMagick-#{$1}-Q8\\include"}
128
+ # The /link option is required by the Makefile but causes warnings in the mkmf.log file.
129
+ $LDFLAGS = %Q{/link /LIBPATH:"C:\\Program Files\\Microsoft Platform SDK for Windows Server 2003 R2\\Lib" /LIBPATH:"C:\\Program Files\\ImageMagick-#{$1}-Q8\\lib" /LIBPATH:"C:\\ruby\\lib"}
130
+ $LOCAL_LIBS = 'CORE_RL_magick_.lib X11.lib'
104
131
 
105
- # Ensure ImageMagick is not configured for HDRI
106
- unless checking_for("HDRI disabled version of ImageMagick") do
107
- not (`Magick-config --version`["HDRI"])
108
- end
109
- exit_failure "\nCan't install RMagick #{RMAGICK_VERS}."+
110
- "\nRMagick does not work when ImageMagick is configured for High Dynamic Range Images."+
111
- "\nDon't use the --enable-hdri option when configuring ImageMagick.\n"
112
132
  end
113
133
 
114
- # Save flags
115
- $CFLAGS = ENV["CFLAGS"].to_s + " " + `Magick-config --cflags`.chomp
116
- $CPPFLAGS = `Magick-config --cppflags`.chomp
117
- $LDFLAGS = `Magick-config --ldflags`.chomp
118
- $LOCAL_LIBS = `Magick-config --libs`.chomp
134
+
119
135
 
120
136
  #headers = %w{assert.h ctype.h errno.h float.h limits.h math.h stdarg.h stddef.h stdint.h stdio.h stdlib.h string.h time.h}
121
- headers = %w{assert.h ctype.h stdint.h stdio.h stdlib.h math.h time.h}
137
+ headers = %w{assert.h ctype.h stdio.h stdlib.h math.h time.h}
138
+ headers << "stdint.h" if have_header("stdint.h") # defines uint64_t
122
139
  headers << "sys/types.h" if have_header("sys/types.h")
123
140
 
124
141
 
@@ -128,12 +145,17 @@ else
128
145
  headers << "magick/MagickCore.h"
129
146
  end
130
147
 
131
- unless have_library("Magick", "InitializeMagick", headers)
132
- exit_failure "Can't install RMagick #{RMAGICK_VERS}. " +
133
- "Can't find libMagick or one of the dependent libraries. " +
134
- "Check the mkmf.log file for more detailed information.\n"
148
+
149
+ if RUBY_PLATFORM !~ /mswin/
150
+
151
+ unless have_library("Magick", "InitializeMagick", headers)
152
+ exit_failure "Can't install RMagick #{RMAGICK_VERS}. " +
153
+ "Can't find libMagick or one of the dependent libraries. " +
154
+ "Check the mkmf.log file for more detailed information.\n"
155
+ end
135
156
  end
136
157
 
158
+
137
159
  have_func("snprintf", headers)
138
160
 
139
161
 
@@ -170,6 +192,8 @@ have_type("long double", headers)
170
192
  have_type("unsigned long long", headers)
171
193
  have_type("uint64_t", headers)
172
194
  have_type("__int64", headers)
195
+ have_type("uintmax_t", headers)
196
+ check_sizeof("unsigned long", headers)
173
197
  check_sizeof("Image *", headers)
174
198
 
175
199
 
@@ -205,20 +229,8 @@ have_enum_values("VirtualPixelMethod", ["MaskVirtualPixelMethod", # 6
205
229
  "WhiteVirtualPixelMethod"], headers) # 6.3.5
206
230
 
207
231
 
208
- # Now test Ruby 1.9.0 features. intern.h depends on stdarg.h.
209
- if have_header("stdarg.h")
210
- $CPPFLAGS << " -DHAVE_STDARG_PROTOTYPES=1"
211
- end
212
-
232
+ # Now test Ruby 1.9.0 features.
213
233
  headers = ["ruby.h", "rubyio.h"]
214
-
215
- if have_header("intern.h")
216
- headers << "intern.h"
217
- elsif have_header("ruby/intern.h")
218
- headers << "ruby/intern.h"
219
- else
220
- exit_failure "Can't find intern.h"
221
- end
222
234
  have_func("rb_frame_this_func", headers)
223
235
  have_new_rb_cvar_set(headers)
224
236
 
@@ -1,6 +1,6 @@
1
- /* $Id: rmagick.h,v 1.211 2007/12/26 21:41:48 rmagick Exp $ */
1
+ /* $Id: rmagick.h,v 1.220 2008/01/05 19:24:22 rmagick Exp $ */
2
2
  /*=============================================================================
3
- | Copyright (C) 2006 by Timothy P. Hunter
3
+ | Copyright (C) 2008 by Timothy P. Hunter
4
4
  | Name: rmagick.h
5
5
  | Purpose: RMagick declarations and definitions
6
6
  | Author: Tim Hunter
@@ -9,10 +9,15 @@
9
9
  #ifndef _RMAGICK_H_
10
10
  #define _RMAGICK_H_
11
11
 
12
+ // Suppress warnings about deprecated functions on Windows
13
+ #define _CRT_SECURE_NO_DEPRECATE 1
14
+
12
15
  #include <assert.h>
13
16
  #include <stdio.h>
14
17
  #include <ctype.h>
18
+ #if defined(HAVE_STDINT_H)
15
19
  #include <stdint.h>
20
+ #endif
16
21
  #include <stdlib.h>
17
22
  #include <math.h>
18
23
  #include <time.h>
@@ -20,11 +25,6 @@
20
25
  #include <sys/types.h>
21
26
  #endif
22
27
  #include "ruby.h"
23
- #if defined(HAVE_RUBY_INTERN_H)
24
- #include "ruby/intern.h"
25
- #else
26
- #include "intern.h"
27
- #endif
28
28
  #include "rubyio.h"
29
29
 
30
30
 
@@ -34,6 +34,7 @@
34
34
  #undef PACKAGE_STRING
35
35
  #undef PACKAGE_BUGREPORT
36
36
  #undef PACKAGE_TARNAME
37
+ #undef WORDS_BIGENDIAN
37
38
 
38
39
  #include "magick/MagickCore.h"
39
40
 
@@ -41,7 +42,7 @@
41
42
  #undef PACKAGE_STRING
42
43
 
43
44
 
44
- #include "extconf.h"
45
+ #include RUBY_EXTCONF_H
45
46
 
46
47
 
47
48
  // For quoting preprocessor symbols
@@ -104,6 +105,22 @@
104
105
  #define OpenFile rb_io_t
105
106
  #endif
106
107
 
108
+ // These macros are needed in 1.9.0 but aren't defined prior to 1.8.6.
109
+ #if !defined(RSTRING_LEN)
110
+ #define RSTRING_LEN(s) (RSTRING(s)->len)
111
+ #endif
112
+ #if !defined(RSTRING_PTR)
113
+ #define RSTRING_PTR(s) (RSTRING(s)->ptr)
114
+ #endif
115
+
116
+ // Backport these two macros to 1.8
117
+ #if !defined(RARRAY_LEN)
118
+ #define RARRAY_LEN(a) RARRAY(a)->len
119
+ #endif
120
+ #if !defined(RARRAY_PTR)
121
+ #define RARRAY_PTR(a) RARRAY(a)->ptr
122
+ #endif
123
+
107
124
  // ImageLayerMethod replaced MagickLayerMethod starting with 6.3.6
108
125
  #if defined(HAVE_TYPE_IMAGELAYERMETHOD)
109
126
  #define LAYERMETHODTYPE ImageLayerMethod
@@ -319,9 +336,12 @@ EXTERN ID rm_ID_width; // "width"
319
336
  EXTERN ID rm_ID_x; // "x"
320
337
  EXTERN ID rm_ID_y; // "y"
321
338
 
322
-
339
+ #if !defined(min)
323
340
  #define min(a,b) ((a)<(b)?(a):(b))
341
+ #endif
342
+ #if !defined(max)
324
343
  #define max(a,b) ((a)>(b)?(a):(b))
344
+ #endif
325
345
 
326
346
  /*
327
347
  Handle warnings & errors
@@ -612,6 +632,7 @@ ATTR_ACCESSOR(Info, attenuate)
612
632
  ATTR_ACCESSOR(Info, authenticate)
613
633
  ATTR_ACCESSOR(Info, background_color)
614
634
  ATTR_ACCESSOR(Info, border_color)
635
+ ATTR_ACCESSOR(Info, caption)
615
636
  ATTR_ACCESSOR(Info, colorspace)
616
637
  ATTR_ACCESSOR(Info, comment)
617
638
  ATTR_ACCESSOR(Info, compression)
@@ -952,6 +973,7 @@ extern VALUE TextureFill_fill(VALUE, VALUE);
952
973
  extern VALUE ChromaticityInfo_to_s(VALUE);
953
974
  extern VALUE ChromaticityInfo_new(ChromaticityInfo *);
954
975
  extern void Color_to_PixelPacket(PixelPacket *, VALUE);
976
+ extern void Color_to_MagickPixelPacket(Image *, MagickPixelPacket *, VALUE);
955
977
  extern VALUE Color_to_s(VALUE);
956
978
  extern VALUE Color_from_ColorInfo(const ColorInfo *);
957
979
  extern VALUE ClassType_new(ClassType);
@@ -1036,7 +1058,7 @@ extern VALUE Enum_type_each(VALUE);
1036
1058
  extern void *magick_malloc(const size_t);
1037
1059
  extern void *magick_safe_malloc(const size_t, const size_t);
1038
1060
  extern void magick_free(void *);
1039
- extern void *magick_realloc(void *, size_t);
1061
+ extern void *magick_realloc(void *, const size_t);
1040
1062
  extern void *magick_safe_realloc(void *, const size_t, const size_t);
1041
1063
  extern void magick_clone_string(char **, const char *);
1042
1064
  extern VALUE rm_enum_new(VALUE, VALUE, VALUE);
@@ -1049,7 +1071,8 @@ extern int rm_strcasecmp(const char *, const char *);
1049
1071
  extern int rm_strncasecmp(const char *, const char *, size_t);
1050
1072
  extern void rm_check_ary_len(VALUE, long);
1051
1073
  extern Image *rm_check_destroyed(VALUE);
1052
- extern Image *rm_check_frozen_image(VALUE);
1074
+ extern Image *rm_check_frozen(VALUE);
1075
+ extern char *rm_str2cstr(VALUE, long *);
1053
1076
  extern int rm_check_num2dbl(VALUE);
1054
1077
  extern double rm_fuzz_to_dbl(VALUE);
1055
1078
  extern Quantum rm_app2quantum(VALUE);
data/ext/RMagick/rmdraw.c CHANGED
@@ -1,6 +1,6 @@
1
- /* $Id: rmdraw.c,v 1.59 2007/11/25 21:32:41 rmagick Exp $ */
1
+ /* $Id: rmdraw.c,v 1.61 2008/01/01 23:18:31 rmagick Exp $ */
2
2
  /*============================================================================\
3
- | Copyright (C) 2007 by Timothy P. Hunter
3
+ | Copyright (C) 2008 by Timothy P. Hunter
4
4
  | Name: rmdraw.c
5
5
  | Author: Tim Hunter
6
6
  | Purpose: Contains Draw class methods.
@@ -479,7 +479,7 @@ VALUE Draw_annotate(
479
479
  keep = draw->info->affine;
480
480
 
481
481
  image_arg = ImageList_cur_image(image_arg);
482
- image = rm_check_frozen_image(image_arg);
482
+ image = rm_check_frozen(image_arg);
483
483
 
484
484
  // If we have an optional parm block, run it in self's context,
485
485
  // allowing the app a chance to modify the object's attributes
@@ -683,7 +683,7 @@ Draw_draw(VALUE self, VALUE image_arg)
683
683
  Image *image;
684
684
 
685
685
  image_arg = ImageList_cur_image(image_arg);
686
- image = rm_check_frozen_image(image_arg);
686
+ image = rm_check_frozen(image_arg);
687
687
 
688
688
  Data_Get_Struct(self, Draw, draw);
689
689
  if (draw->primitives == 0)
@@ -1461,7 +1461,7 @@ get_type_metrics(
1461
1461
  switch (argc)
1462
1462
  {
1463
1463
  case 1: // use default image
1464
- text = rb_str2cstr(argv[0], &text_l);
1464
+ text = rm_str2cstr(argv[0], &text_l);
1465
1465
 
1466
1466
  for (x = 0; x < text_l; x++)
1467
1467
  {
@@ -1488,7 +1488,7 @@ get_type_metrics(
1488
1488
  case 2:
1489
1489
  t = ImageList_cur_image(argv[0]);
1490
1490
  image = rm_check_destroyed(t);
1491
- text = rb_str2cstr(argv[1], &text_l);
1491
+ text = rm_str2cstr(argv[1], &text_l);
1492
1492
  break; // okay
1493
1493
  default:
1494
1494
  rb_raise(rb_eArgError, "wrong number of arguments (%d for 1 or 2)", argc);
data/ext/RMagick/rmfill.c CHANGED
@@ -1,6 +1,6 @@
1
- /* $Id: rmfill.c,v 1.25 2007/10/28 23:43:24 rmagick Exp $ */
1
+ /* $Id: rmfill.c,v 1.26 2008/01/01 23:18:31 rmagick Exp $ */
2
2
  /*============================================================================\
3
- | Copyright (C) 2007 by Timothy P. Hunter
3
+ | Copyright (C) 2008 by Timothy P. Hunter
4
4
  | Name: rmfill.c
5
5
  | Author: Tim Hunter
6
6
  | Purpose: GradientFill, TextureFill class definitions for RMagick
@@ -1,6 +1,6 @@
1
- /* $Id: rmilist.c,v 1.65 2007/12/26 21:41:24 rmagick Exp $ */
1
+ /* $Id: rmilist.c,v 1.69 2008/01/03 15:32:00 rmagick Exp $ */
2
2
  /*============================================================================\
3
- | Copyright (C) 2007 by Timothy P. Hunter
3
+ | Copyright (C) 2008 by Timothy P. Hunter
4
4
  | Name: rmilist.c
5
5
  | Author: Tim Hunter
6
6
  | Purpose: ImageList class method definitions for RMagick
@@ -340,7 +340,7 @@ ImageList_map(int argc, VALUE *argv, VALUE self)
340
340
  {
341
341
  Image *images, *new_images = NULL;
342
342
  Image *map;
343
- unsigned int dither = False;
343
+ unsigned int dither = MagickFalse;
344
344
  volatile VALUE scene, new_imagelist, t;
345
345
  ExceptionInfo exception;
346
346
 
@@ -699,7 +699,7 @@ static long
699
699
  imagelist_length(VALUE imagelist)
700
700
  {
701
701
  volatile VALUE images = rb_iv_get(imagelist, "@images");
702
- return RARRAY(images)->len;
702
+ return RARRAY_LEN(images);
703
703
  }
704
704
 
705
705
  /*
@@ -900,7 +900,7 @@ ImageList_write(VALUE self, VALUE file)
900
900
  const MagickInfo *m;
901
901
  volatile VALUE info_obj;
902
902
  char *filename;
903
- long filenameL;
903
+ long filename_l;
904
904
  unsigned long scene;
905
905
  ExceptionInfo exception;
906
906
 
@@ -922,10 +922,10 @@ ImageList_write(VALUE self, VALUE file)
922
922
  file = rb_rescue(rb_String, file, file_arg_rescue, file);
923
923
 
924
924
  // Copy the filename to the Info and to the Image.
925
- filename = rb_str2cstr(file, &filenameL);
926
- filenameL = min(filenameL, MaxTextExtent-1);
927
- memcpy(info->filename, filename, (size_t)filenameL);
928
- info->filename[filenameL] = '\0';
925
+ filename = rm_str2cstr(file, &filename_l);
926
+ filename_l = min(filename_l, MaxTextExtent-1);
927
+ memcpy(info->filename, filename, (size_t)filename_l);
928
+ info->filename[filename_l] = '\0';
929
929
  SetImageInfoFile(info, NULL);
930
930
  }
931
931