rmagick 1.14.1 → 1.15.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 (66) hide show
  1. data/ChangeLog +22 -0
  2. data/README.html +11 -63
  3. data/README.txt +8 -56
  4. data/configure +214 -787
  5. data/configure.ac +22 -24
  6. data/doc/comtasks.html +2 -2
  7. data/doc/constants.html +5 -6
  8. data/doc/draw.html +33 -14
  9. data/doc/ex/clip_path.rb +3 -0
  10. data/doc/ex/path.rb +1 -1
  11. data/doc/ex/polaroid.rb +23 -0
  12. data/doc/ex/tspan01.rb +2 -2
  13. data/doc/ex/tspan02.rb +2 -2
  14. data/doc/ex/tspan03.rb +3 -3
  15. data/doc/ex/wet_floor.rb +54 -0
  16. data/doc/ilist.html +83 -4
  17. data/doc/image1.html +4 -5
  18. data/doc/image2.html +395 -266
  19. data/doc/image3.html +104 -8
  20. data/doc/imageattrs.html +2 -2
  21. data/doc/imusage.html +2 -2
  22. data/doc/index.html +22 -18
  23. data/doc/info.html +28 -6
  24. data/doc/magick.html +125 -4
  25. data/doc/optequiv.html +196 -21
  26. data/doc/rvg.html +2 -2
  27. data/doc/rvgclip.html +2 -2
  28. data/doc/rvggroup.html +2 -2
  29. data/doc/rvgimage.html +2 -2
  30. data/doc/rvgpattern.html +2 -2
  31. data/doc/rvgshape.html +2 -2
  32. data/doc/rvgstyle.html +2 -2
  33. data/doc/rvgtext.html +2 -2
  34. data/doc/rvgtspan.html +2 -2
  35. data/doc/rvgtut.html +3 -3
  36. data/doc/rvguse.html +2 -2
  37. data/doc/rvgxform.html +2 -2
  38. data/doc/struct.html +2 -2
  39. data/doc/usage.html +26 -5
  40. data/ext/RMagick/MANIFEST +3 -1
  41. data/ext/RMagick/rmagick.h +46 -12
  42. data/ext/RMagick/rmagick_config.h.in +12 -2
  43. data/ext/RMagick/rmdraw.c +202 -62
  44. data/ext/RMagick/rmfill.c +36 -36
  45. data/ext/RMagick/rmilist.c +75 -31
  46. data/ext/RMagick/rmimage.c +640 -323
  47. data/ext/RMagick/rminfo.c +76 -15
  48. data/ext/RMagick/rmmain.c +107 -30
  49. data/ext/RMagick/rmutil.c +97 -68
  50. data/lib/RMagick.rb +11 -11
  51. data/lib/rvg/clippath.rb +38 -36
  52. data/lib/rvg/container.rb +120 -118
  53. data/lib/rvg/deep_equal.rb +44 -42
  54. data/lib/rvg/describable.rb +49 -47
  55. data/lib/rvg/embellishable.rb +399 -397
  56. data/lib/rvg/misc.rb +613 -603
  57. data/lib/rvg/paint.rb +38 -36
  58. data/lib/rvg/pathdata.rb +124 -122
  59. data/lib/rvg/rvg.rb +202 -198
  60. data/lib/rvg/stretchable.rb +132 -130
  61. data/lib/rvg/stylable.rb +101 -99
  62. data/lib/rvg/text.rb +173 -171
  63. data/lib/rvg/transformable.rb +120 -118
  64. data/lib/rvg/units.rb +60 -58
  65. data/rmagick.gemspec +1 -1
  66. metadata +5 -3
@@ -1,6 +1,6 @@
1
- /* $Id: rminfo.c,v 1.42 2006/09/16 19:15:03 rmagick Exp $ */
1
+ /* $Id: rminfo.c,v 1.45 2007/01/12 00:11:19 rmagick Exp $ */
2
2
  /*============================================================================\
3
- | Copyright (C) 2006 by Timothy P. Hunter
3
+ | Copyright (C) 2007 by Timothy P. Hunter
4
4
  | Name: rminfo.c
5
5
  | Author: Tim Hunter
6
6
  | Purpose: Info class method definitions for RMagick.
@@ -141,7 +141,7 @@ Info_aset(VALUE self, VALUE format, VALUE key, VALUE value)
141
141
  GetExceptionInfo(&exception);
142
142
  okay = AddDefinitions(info, definitions, &exception);
143
143
  CHECK_EXCEPTION()
144
- DestroyExceptionInfo(&exception);
144
+ (void) DestroyExceptionInfo(&exception);
145
145
 
146
146
  if (!okay)
147
147
  {
@@ -444,7 +444,7 @@ Info_define(int argc, VALUE *argv, VALUE self)
444
444
  GetExceptionInfo(&exception);
445
445
  okay = AddDefinitions(info, definitions, &exception);
446
446
  CHECK_EXCEPTION()
447
- DestroyExceptionInfo(&exception);
447
+ (void) DestroyExceptionInfo(&exception);
448
448
 
449
449
  if (!okay)
450
450
  {
@@ -500,8 +500,7 @@ Info_delay(VALUE self)
500
500
  static VALUE
501
501
  arg_is_integer(VALUE arg)
502
502
  {
503
- double d;
504
- d = NUM2INT(arg);
503
+ int d = NUM2INT(arg);
505
504
  d = d; // satisfy icc
506
505
  return arg;
507
506
  }
@@ -530,7 +529,7 @@ Info_delay_eq(VALUE self, VALUE string)
530
529
  else
531
530
  {
532
531
  not_num = 0;
533
- rb_protect(arg_is_integer, string, &not_num);
532
+ (void) rb_protect(arg_is_integer, string, &not_num);
534
533
  if (not_num)
535
534
  {
536
535
  rb_raise(rb_eTypeError, "failed to convert %s into Integer", rb_class2name(CLASS_OF(string)));
@@ -592,10 +591,10 @@ VALUE
592
591
  Info_depth_eq(VALUE self, VALUE depth)
593
592
  {
594
593
  Info *info;
595
- int d;
594
+ unsigned long d;
596
595
 
597
596
  Data_Get_Struct(self, Info, info);
598
- d = NUM2INT(depth);
597
+ d = NUM2ULONG(depth);
599
598
  switch (d)
600
599
  {
601
600
  case 8: // always okay
@@ -951,7 +950,7 @@ VALUE Info_format(VALUE self)
951
950
  {
952
951
  GetExceptionInfo(&exception);
953
952
  magick_info = GetMagickInfo(info->magick, &exception);
954
- DestroyExceptionInfo(&exception);
953
+ (void) DestroyExceptionInfo(&exception);
955
954
 
956
955
  return magick_info ? rb_str_new2(magick_info->name) : Qnil;
957
956
  }
@@ -978,7 +977,7 @@ Info_format_eq(VALUE self, VALUE magick)
978
977
  mgk = STRING_PTR(magick);
979
978
  m = GetMagickInfo(mgk, &exception);
980
979
  CHECK_EXCEPTION()
981
- DestroyExceptionInfo(&exception);
980
+ (void) DestroyExceptionInfo(&exception);
982
981
 
983
982
  if (!m)
984
983
  {
@@ -1299,6 +1298,69 @@ Info_orientation_eq(VALUE self, VALUE inter)
1299
1298
  #endif
1300
1299
  }
1301
1300
 
1301
+
1302
+ /*
1303
+ Method: Info#origin
1304
+ Purpose: Return origin geometry
1305
+ */
1306
+ VALUE
1307
+ Info_origin(VALUE self)
1308
+ {
1309
+ #if defined(HAVE_SETIMAGEOPTION)
1310
+ Info *info;
1311
+ const char *origin;
1312
+
1313
+ Data_Get_Struct(self, Info, info);
1314
+
1315
+ origin = GetImageOption(info, "origin");
1316
+ return origin ? rb_str_new2(origin) : Qnil;
1317
+
1318
+ #else
1319
+ rm_not_implemented();
1320
+ return (VALUE)0;
1321
+ #endif
1322
+ }
1323
+
1324
+
1325
+ /*
1326
+ Method: Info#origin=+-x+-y
1327
+ Purpose: Set origin geometry. Argument may be a Geometry object as well
1328
+ as a geometry string.
1329
+ */
1330
+ VALUE
1331
+ Info_origin_eq(VALUE self, VALUE origin_arg)
1332
+ {
1333
+ #if defined(HAVE_SETIMAGEOPTION)
1334
+ Info *info;
1335
+ volatile VALUE origin_str;
1336
+ char *origin;
1337
+
1338
+ Data_Get_Struct(self, Info, info);
1339
+
1340
+ if (NIL_P(origin_arg))
1341
+ {
1342
+ (void) RemoveImageOption(info, "origin");
1343
+ return self;
1344
+ }
1345
+
1346
+ origin_str = rb_funcall(origin_arg, ID_to_s, 0);
1347
+ origin = GetPageGeometry(STRING_PTR(origin_str));
1348
+
1349
+ if (IsGeometry(origin) == MagickFalse)
1350
+ {
1351
+ rb_raise(rb_eArgError, "invalid origin geometry: %s", origin);
1352
+ }
1353
+
1354
+ (void) SetImageOption(info, "origin", origin);
1355
+ return self;
1356
+
1357
+ #else
1358
+ rm_not_implemented();
1359
+ return (VALUE)0;
1360
+ #endif
1361
+ }
1362
+
1363
+
1302
1364
  VALUE
1303
1365
  Info_page(VALUE self)
1304
1366
  {
@@ -1307,7 +1369,6 @@ Info_page(VALUE self)
1307
1369
 
1308
1370
  Data_Get_Struct(self, Info, info);
1309
1371
  #if defined(HAVE_SETIMAGEOPTION)
1310
-
1311
1372
  page = GetImageOption(info, "page");
1312
1373
  #else
1313
1374
  page = (const char *)info->page;
@@ -1351,7 +1412,7 @@ Info_page_eq(VALUE self, VALUE page_arg)
1351
1412
  }
1352
1413
 
1353
1414
  DEF_ATTR_ACCESSOR(Info, pointsize, dbl)
1354
- DEF_ATTR_ACCESSOR(Info, quality, long)
1415
+ DEF_ATTR_ACCESSOR(Info, quality, ulong)
1355
1416
 
1356
1417
  /*
1357
1418
  Method: Info#sampling_factor, #sampling_factor=
@@ -1716,7 +1777,7 @@ destroy_Info(void *infoptr)
1716
1777
  info->texture = NULL;
1717
1778
  }
1718
1779
 
1719
- DestroyImageInfo(info);
1780
+ (void) DestroyImageInfo(info);
1720
1781
  }
1721
1782
 
1722
1783
  /*
@@ -1795,7 +1856,7 @@ Info_initialize(VALUE self)
1795
1856
  if (rb_block_given_p())
1796
1857
  {
1797
1858
  // Run the block in self's context
1798
- rb_obj_instance_eval(0, NULL, self);
1859
+ (void) rb_obj_instance_eval(0, NULL, self);
1799
1860
  }
1800
1861
  return self;
1801
1862
  }
@@ -1,6 +1,6 @@
1
- /* $Id: rmmain.c,v 1.147 2006/10/21 13:43:23 rmagick Exp $ */
1
+ /* $Id: rmmain.c,v 1.159 2007/01/20 15:45:29 rmagick Exp $ */
2
2
  /*============================================================================\
3
- | Copyright (C) 2006 by Timothy P. Hunter
3
+ | Copyright (C) 2007 by Timothy P. Hunter
4
4
  | Name: rmmain.c
5
5
  | Author: Tim Hunter
6
6
  | Purpose: Contains all module, class, method declarations.
@@ -44,7 +44,7 @@ Magick_colors(VALUE class)
44
44
 
45
45
  color_ary = GetColorInfoArray(&exception);
46
46
  CHECK_EXCEPTION()
47
- DestroyExceptionInfo(&exception);
47
+ (void) DestroyExceptionInfo(&exception);
48
48
 
49
49
 
50
50
  if (rb_block_given_p())
@@ -89,7 +89,7 @@ Magick_colors(VALUE class)
89
89
 
90
90
  color_info_list = GetColorInfoList("*", &number_colors, &exception);
91
91
  CHECK_EXCEPTION()
92
- DestroyExceptionInfo(&exception);
92
+ (void) DestroyExceptionInfo(&exception);
93
93
 
94
94
  #endif
95
95
 
@@ -98,7 +98,7 @@ Magick_colors(VALUE class)
98
98
  {
99
99
  for(x = 0; x < number_colors; x++)
100
100
  {
101
- rb_yield(Color_from_ColorInfo(color_info_list[x]));
101
+ (void) rb_yield(Color_from_ColorInfo(color_info_list[x]));
102
102
  }
103
103
  magick_free(color_info_list);
104
104
  return class;
@@ -108,7 +108,7 @@ Magick_colors(VALUE class)
108
108
  ary = rb_ary_new2((long) number_colors);
109
109
  for(x = 0; x < number_colors; x++)
110
110
  {
111
- rb_ary_push(ary, Color_from_ColorInfo(color_info_list[x]));
111
+ (void) rb_ary_push(ary, Color_from_ColorInfo(color_info_list[x]));
112
112
  }
113
113
 
114
114
  magick_free(color_info_list);
@@ -125,7 +125,7 @@ Magick_colors(VALUE class)
125
125
  GetExceptionInfo(&exception);
126
126
 
127
127
  color_list = GetColorInfo("*", &exception);
128
- DestroyExceptionInfo(&exception);
128
+ (void) DestroyExceptionInfo(&exception);
129
129
 
130
130
  // The order of the colors list can change in mid-iteration,
131
131
  // so the only way we can guarantee a single pass thru the list
@@ -179,7 +179,7 @@ Magick_fonts(VALUE class)
179
179
  GetExceptionInfo(&exception);
180
180
  type_info = GetTypeInfoList("*", &number_types, &exception);
181
181
  CHECK_EXCEPTION()
182
- DestroyExceptionInfo(&exception);
182
+ (void) DestroyExceptionInfo(&exception);
183
183
 
184
184
  #endif
185
185
 
@@ -187,17 +187,17 @@ Magick_fonts(VALUE class)
187
187
  {
188
188
  for(x = 0; x < number_types; x++)
189
189
  {
190
- rb_yield(Font_from_TypeInfo((TypeInfo *)type_info[x]));
190
+ (void) rb_yield(Font_from_TypeInfo((TypeInfo *)type_info[x]));
191
191
  }
192
192
  magick_free(type_info);
193
193
  return class;
194
194
  }
195
195
  else
196
196
  {
197
- ary = rb_ary_new2(number_types);
197
+ ary = rb_ary_new2((long)number_types);
198
198
  for(x = 0; x < number_types; x++)
199
199
  {
200
- rb_ary_push(ary, Font_from_TypeInfo((TypeInfo *)type_info[x]));
200
+ (void) rb_ary_push(ary, Font_from_TypeInfo((TypeInfo *)type_info[x]));
201
201
  }
202
202
  magick_free(type_info);
203
203
  return ary;
@@ -214,7 +214,7 @@ Magick_fonts(VALUE class)
214
214
 
215
215
  type_list = GetTypeInfo("*", &exception);
216
216
  CHECK_EXCEPTION()
217
- DestroyExceptionInfo(&exception);
217
+ (void) DestroyExceptionInfo(&exception);
218
218
 
219
219
  // If block, iterate over fonts
220
220
  if (rb_block_given_p())
@@ -288,7 +288,7 @@ Magick_init_formats(VALUE class)
288
288
  GetExceptionInfo(&exception);
289
289
  magick_info = (MagickInfo *)GetMagickInfoArray(&exception);
290
290
  CHECK_EXCEPTION()
291
- DestroyExceptionInfo(&exception);
291
+ (void) DestroyExceptionInfo(&exception);
292
292
 
293
293
  for(m = magick_info; m != NULL; m = m->next)
294
294
  {
@@ -318,15 +318,15 @@ Magick_init_formats(VALUE class)
318
318
  GetExceptionInfo(&exception);
319
319
  magick_info = GetMagickInfoList("*", &number_formats, &exception);
320
320
  CHECK_EXCEPTION()
321
- DestroyExceptionInfo(&exception);
321
+ (void) DestroyExceptionInfo(&exception);
322
322
 
323
323
  #endif
324
324
 
325
325
  for(x = 0; x < number_formats; x++)
326
326
  {
327
- rb_hash_aset(formats
328
- , rb_str_new2(magick_info[x]->name)
329
- , MagickInfo_to_format((MagickInfo *)magick_info[x]));
327
+ (void) rb_hash_aset(formats
328
+ , rb_str_new2(magick_info[x]->name)
329
+ , MagickInfo_to_format((MagickInfo *)magick_info[x]));
330
330
  }
331
331
  return formats;
332
332
 
@@ -343,7 +343,7 @@ Magick_init_formats(VALUE class)
343
343
  GetExceptionInfo(&exception);
344
344
  m = (MagickInfo *)GetMagickInfo("*", &exception);
345
345
  CHECK_EXCEPTION()
346
- DestroyExceptionInfo(&exception);
346
+ (void) DestroyExceptionInfo(&exception);
347
347
 
348
348
  for ( ; m != NULL; m = m->next)
349
349
  {
@@ -380,7 +380,7 @@ Magick_limit_resource(int argc, VALUE *argv, VALUE class)
380
380
  return class;
381
381
 
382
382
  case T_SYMBOL:
383
- id = SYM2ID(resource);
383
+ id = (ID)SYM2ID(resource);
384
384
  if (id == rb_intern("memory"))
385
385
  {
386
386
  res = MemoryResource;
@@ -436,7 +436,7 @@ Magick_limit_resource(int argc, VALUE *argv, VALUE class)
436
436
 
437
437
  if (argc > 1)
438
438
  {
439
- SetMagickResourceLimit(res, NUM2ULONG(limit));
439
+ (void) SetMagickResourceLimit(res, NUM2ULONG(limit));
440
440
  }
441
441
 
442
442
  return ULONG2NUM(cur_limit);
@@ -532,8 +532,8 @@ static VALUE
532
532
  Magick_set_cache_threshold(VALUE class, VALUE threshold)
533
533
  {
534
534
  unsigned long thrshld = NUM2ULONG(threshold);
535
- SetMagickResourceLimit(MemoryResource,thrshld);
536
- SetMagickResourceLimit(MapResource,2*thrshld);
535
+ (void) SetMagickResourceLimit(MemoryResource,thrshld);
536
+ (void) SetMagickResourceLimit(MapResource,2*thrshld);
537
537
  return class;
538
538
  }
539
539
 
@@ -825,6 +825,7 @@ Init_RMagick(void)
825
825
  rb_define_method(Class_Image, "inspect", Image_inspect, 0);
826
826
  rb_define_method(Class_Image, "level2", Image_level2, -1);
827
827
  rb_define_method(Class_Image, "level_channel", Image_level_channel, -1);
828
+ rb_define_method(Class_Image, "linear_stretch", Image_linear_stretch, -1);
828
829
  rb_define_method(Class_Image, "magnify", Image_magnify, 0);
829
830
  rb_define_method(Class_Image, "magnify!", Image_magnify_bang, 0);
830
831
  rb_define_method(Class_Image, "map", Image_map, -1);
@@ -845,6 +846,7 @@ Init_RMagick(void)
845
846
  rb_define_method(Class_Image, "ordered_dither", Image_ordered_dither, -1);
846
847
  rb_define_method(Class_Image, "palette?", Image_palette_q, 0);
847
848
  rb_define_method(Class_Image, "pixel_color", Image_pixel_color, -1);
849
+ rb_define_method(Class_Image, "polaroid", Image_polaroid, -1);
848
850
  rb_define_method(Class_Image, "posterize", Image_posterize, -1);
849
851
  // rb_define_method(Class_Image, "plasma", Image_plasma, 6);
850
852
  rb_define_method(Class_Image, "preview", Image_preview, 1);
@@ -856,6 +858,7 @@ Init_RMagick(void)
856
858
  rb_define_method(Class_Image, "raise", Image_raise, -1);
857
859
  rb_define_method(Class_Image, "random_channel_threshold", Image_random_channel_threshold, 2);
858
860
  rb_define_method(Class_Image, "random_threshold_channel", Image_random_threshold_channel, -1);
861
+ rb_define_method(Class_Image, "recolor", Image_recolor, 1);
859
862
  rb_define_method(Class_Image, "reduce_noise", Image_reduce_noise, 1);
860
863
  rb_define_method(Class_Image, "resize", Image_resize, -1);
861
864
  rb_define_method(Class_Image, "resize!", Image_resize_bang, -1);
@@ -909,6 +912,7 @@ Init_RMagick(void)
909
912
  rb_define_method(Class_Image, "vignette", Image_vignette, -1);
910
913
  rb_define_method(Class_Image, "watermark", Image_watermark, -1);
911
914
  rb_define_method(Class_Image, "wave", Image_wave, -1);
915
+ rb_define_method(Class_Image, "wet_floor", Image_wet_floor, -1);
912
916
  rb_define_method(Class_Image, "white_threshold", Image_white_threshold, -1);
913
917
  rb_define_method(Class_Image, "write", Image_write, 1);
914
918
 
@@ -931,6 +935,7 @@ Init_RMagick(void)
931
935
  rb_define_method(Class_ImageList, "deconstruct", ImageList_deconstruct, 0);
932
936
  rb_define_method(Class_ImageList, "display", ImageList_display, 0);
933
937
  rb_define_method(Class_ImageList, "flatten_images", ImageList_flatten_images, 0);
938
+ rb_define_method(Class_ImageList, "fx", ImageList_fx, -1);
934
939
  rb_define_method(Class_ImageList, "map", ImageList_map, -1);
935
940
  rb_define_method(Class_ImageList, "montage", ImageList_montage, 0);
936
941
  rb_define_method(Class_ImageList, "morph", ImageList_morph, 1);
@@ -953,7 +958,6 @@ Init_RMagick(void)
953
958
 
954
959
  DCL_ATTR_WRITER(Draw, affine)
955
960
  DCL_ATTR_WRITER(Draw, align)
956
- DCL_ATTR_WRITER(Draw, border_color)
957
961
  DCL_ATTR_WRITER(Draw, decorate)
958
962
  DCL_ATTR_WRITER(Draw, density)
959
963
  DCL_ATTR_WRITER(Draw, encoding)
@@ -984,6 +988,42 @@ Init_RMagick(void)
984
988
  rb_define_method(Class_Draw, "inspect", Draw_inspect, 0);
985
989
  rb_define_method(Class_Draw, "primitive", Draw_primitive, 1);
986
990
 
991
+ /*-----------------------------------------------------------------------*/
992
+ /* Class Magick::DrawOptions is identical to Magick::Draw but with */
993
+ /* only the attribute writer methods. This is the object that is passed */
994
+ /* to the block associated with the Draw.new method call. */
995
+ /*-----------------------------------------------------------------------*/
996
+
997
+ Class_DrawOptions = rb_define_class_under(Class_Image, "DrawOptions", rb_cObject);
998
+
999
+ #if defined(HAVE_RB_DEFINE_ALLOC_FUNC)
1000
+ rb_define_alloc_func(Class_DrawOptions, DrawOptions_alloc);
1001
+ #else
1002
+ rb_define_singleton_method(Class_DrawOptions, "new", DrawOptions_new, 0);
1003
+ #endif
1004
+
1005
+ rb_define_method(Class_DrawOptions, "initialize", DrawOptions_initialize, 0);
1006
+
1007
+ SHARE_ATTR_WRITER(DrawOptions, Draw, affine)
1008
+ SHARE_ATTR_WRITER(DrawOptions, Draw, align)
1009
+ SHARE_ATTR_WRITER(DrawOptions, Draw, decorate)
1010
+ SHARE_ATTR_WRITER(DrawOptions, Draw, density)
1011
+ SHARE_ATTR_WRITER(DrawOptions, Draw, encoding)
1012
+ SHARE_ATTR_WRITER(DrawOptions, Draw, fill)
1013
+ SHARE_ATTR_WRITER(DrawOptions, Draw, font)
1014
+ SHARE_ATTR_WRITER(DrawOptions, Draw, font_family)
1015
+ SHARE_ATTR_WRITER(DrawOptions, Draw, font_stretch)
1016
+ SHARE_ATTR_WRITER(DrawOptions, Draw, font_style)
1017
+ SHARE_ATTR_WRITER(DrawOptions, Draw, font_weight)
1018
+ SHARE_ATTR_WRITER(DrawOptions, Draw, gravity)
1019
+ SHARE_ATTR_WRITER(DrawOptions, Draw, pointsize)
1020
+ SHARE_ATTR_WRITER(DrawOptions, Draw, rotation)
1021
+ SHARE_ATTR_WRITER(DrawOptions, Draw, stroke)
1022
+ SHARE_ATTR_WRITER(DrawOptions, Draw, stroke_width)
1023
+ SHARE_ATTR_WRITER(DrawOptions, Draw, text_antialias)
1024
+ SHARE_ATTR_WRITER(DrawOptions, Draw, tile)
1025
+ SHARE_ATTR_WRITER(DrawOptions, Draw, undercolor)
1026
+
987
1027
  /*-----------------------------------------------------------------------*/
988
1028
  /* Class Magick::Pixel */
989
1029
  /*-----------------------------------------------------------------------*/
@@ -991,7 +1031,7 @@ Init_RMagick(void)
991
1031
  Class_Pixel = rb_define_class_under(Module_Magick, "Pixel", rb_cObject);
992
1032
 
993
1033
  // include Observable in Pixel for Image::View class
994
- rb_require("observer");
1034
+ (void) rb_require("observer");
995
1035
  observable = rb_const_get(rb_cObject, rb_intern("Observable"));
996
1036
  rb_include_module(Class_Pixel, observable);
997
1037
 
@@ -1116,6 +1156,7 @@ Init_RMagick(void)
1116
1156
  DCL_ATTR_ACCESSOR(Info, monochrome)
1117
1157
  DCL_ATTR_ACCESSOR(Info, number_scenes) // new in 5.5.6, replaces subrange
1118
1158
  DCL_ATTR_ACCESSOR(Info, orientation) // new in 6.0.0
1159
+ DCL_ATTR_ACCESSOR(Info, origin) // new in 6.3.1
1119
1160
  DCL_ATTR_ACCESSOR(Info, page)
1120
1161
  DCL_ATTR_ACCESSOR(Info, pointsize)
1121
1162
  DCL_ATTR_ACCESSOR(Info, quality)
@@ -1131,6 +1172,41 @@ Init_RMagick(void)
1131
1172
  DCL_ATTR_ACCESSOR(Info, units)
1132
1173
  DCL_ATTR_ACCESSOR(Info, view)
1133
1174
 
1175
+
1176
+ /*-----------------------------------------------------------------------*/
1177
+ /* Class Magick::Image::PolaroidOptions */
1178
+ /*-----------------------------------------------------------------------*/
1179
+
1180
+ Class_PolaroidOptions = rb_define_class_under(Class_Image, "PolaroidOptions", rb_cObject);
1181
+
1182
+ #if defined(HAVE_RB_DEFINE_ALLOC_FUNC)
1183
+ rb_define_alloc_func(Class_PolaroidOptions, PolaroidOptions_alloc);
1184
+ #else
1185
+ rb_define_singleton_method(Class_PolaroidOptions, "new", PolaroidOptions_new, 0);
1186
+ #endif
1187
+
1188
+ rb_define_method(Class_PolaroidOptions, "initialize", PolaroidOptions_initialize, 0);
1189
+
1190
+ DCL_ATTR_WRITER(PolaroidOptions, shadow_color)
1191
+ // The other attribute writer methods are implemented by Draw's functions
1192
+ SHARE_ATTR_WRITER(PolaroidOptions, Draw, align)
1193
+ SHARE_ATTR_WRITER(PolaroidOptions, Draw, decorate)
1194
+ SHARE_ATTR_WRITER(PolaroidOptions, Draw, density)
1195
+ SHARE_ATTR_WRITER(PolaroidOptions, Draw, encoding)
1196
+ SHARE_ATTR_WRITER(PolaroidOptions, Draw, fill)
1197
+ SHARE_ATTR_WRITER(PolaroidOptions, Draw, font)
1198
+ SHARE_ATTR_WRITER(PolaroidOptions, Draw, font_family)
1199
+ SHARE_ATTR_WRITER(PolaroidOptions, Draw, font_stretch)
1200
+ SHARE_ATTR_WRITER(PolaroidOptions, Draw, font_style)
1201
+ SHARE_ATTR_WRITER(PolaroidOptions, Draw, font_weight)
1202
+ SHARE_ATTR_WRITER(PolaroidOptions, Draw, gravity)
1203
+ SHARE_ATTR_WRITER(PolaroidOptions, Draw, pointsize)
1204
+ SHARE_ATTR_WRITER(PolaroidOptions, Draw, stroke)
1205
+ SHARE_ATTR_WRITER(PolaroidOptions, Draw, stroke_width)
1206
+ SHARE_ATTR_WRITER(PolaroidOptions, Draw, text_antialias)
1207
+ SHARE_ATTR_WRITER(PolaroidOptions, Draw, undercolor)
1208
+
1209
+
1134
1210
  /*-----------------------------------------------------------------------*/
1135
1211
  /* Magick::******Fill classes and methods */
1136
1212
  /*-----------------------------------------------------------------------*/
@@ -1345,12 +1421,10 @@ Init_RMagick(void)
1345
1421
  ENUMERATOR(CopyGreenCompositeOp)
1346
1422
  ENUMERATOR(CopyOpacityCompositeOp)
1347
1423
  ENUMERATOR(CopyRedCompositeOp)
1348
- #if defined(HAVE_COPYCYANCOMPOSITEOP) // CYMK added 5.5.7
1349
1424
  ENUMERATOR(CopyCyanCompositeOp)
1350
1425
  ENUMERATOR(CopyMagentaCompositeOp)
1351
1426
  ENUMERATOR(CopyYellowCompositeOp)
1352
1427
  ENUMERATOR(CopyBlackCompositeOp)
1353
- #endif
1354
1428
  ENUMERATOR(DarkenCompositeOp)
1355
1429
  ENUMERATOR(DifferenceCompositeOp)
1356
1430
  ENUMERATOR(DisplaceCompositeOp)
@@ -1494,6 +1568,9 @@ Init_RMagick(void)
1494
1568
  ENUMERATOR(ColorSeparationType)
1495
1569
  ENUMERATOR(ColorSeparationMatteType)
1496
1570
  ENUMERATOR(OptimizeType)
1571
+ #if defined(HAVE_PALETTEBILEVELMATTETYPE)
1572
+ ENUMERATOR(PaletteBilevelMatteType)
1573
+ #endif
1497
1574
  END_ENUM
1498
1575
 
1499
1576
  // InterlaceType constants
@@ -1851,15 +1928,15 @@ static void version_constants(void)
1851
1928
  mgk_version = GetMagickVersion(NULL);
1852
1929
 
1853
1930
  str = rb_str_new2(mgk_version);
1854
- rb_obj_freeze(str);
1931
+ (void) rb_obj_freeze(str);
1855
1932
  rb_define_const(Module_Magick, "Magick_version", str);
1856
1933
 
1857
1934
  str = rb_str_new2(PACKAGE_STRING);
1858
- rb_obj_freeze(str);
1935
+ (void) rb_obj_freeze(str);
1859
1936
  rb_define_const(Module_Magick, "Version", str);
1860
1937
 
1861
1938
  sprintf(long_version,
1862
- "This is %s ($Date: 2006/10/21 13:43:23 $) Copyright (C) 2006 by Timothy P. Hunter\n"
1939
+ "This is %s ($Date: 2007/01/20 15:45:29 $) Copyright (C) 2007 by Timothy P. Hunter\n"
1863
1940
  "Built with %s\n"
1864
1941
  "Built for %s\n"
1865
1942
  "Web page: http://rmagick.rubyforge.org\n"
@@ -1867,7 +1944,7 @@ static void version_constants(void)
1867
1944
  PACKAGE_STRING, mgk_version, RUBY_VERSION_STRING);
1868
1945
 
1869
1946
  str = rb_str_new2(long_version);
1870
- rb_obj_freeze(str);
1947
+ (void) rb_obj_freeze(str);
1871
1948
  rb_define_const(Module_Magick, "Long_version", str);
1872
1949
 
1873
1950
  }