rmagick 6.2.0 → 7.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (54) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +27 -0
  3. data/Gemfile +3 -4
  4. data/README.md +49 -70
  5. data/Rakefile +1 -8
  6. data/ext/RMagick/extconf.rb +10 -8
  7. data/ext/RMagick/rmagick.cpp +6 -7
  8. data/ext/RMagick/rmagick.h +5 -18
  9. data/ext/RMagick/rmdraw.cpp +6 -7
  10. data/ext/RMagick/rmenum.cpp +5 -6
  11. data/ext/RMagick/rmfill.cpp +6 -8
  12. data/ext/RMagick/rmilist.cpp +6 -7
  13. data/ext/RMagick/rmimage.cpp +55 -109
  14. data/ext/RMagick/rminfo.cpp +6 -8
  15. data/ext/RMagick/rmkinfo.cpp +8 -7
  16. data/ext/RMagick/rmmain.cpp +7 -23
  17. data/ext/RMagick/rmmontage.cpp +6 -8
  18. data/ext/RMagick/rmpixel.cpp +6 -7
  19. data/ext/RMagick/rmstruct.cpp +8 -12
  20. data/ext/RMagick/rmutil.cpp +6 -27
  21. data/lib/rmagick/version.rb +4 -3
  22. data/lib/rmagick_internal.rb +30 -37
  23. data/lib/rvg/clippath.rb +3 -4
  24. data/lib/rvg/container.rb +3 -4
  25. data/lib/rvg/deep_equal.rb +3 -0
  26. data/lib/rvg/describable.rb +4 -5
  27. data/lib/rvg/embellishable.rb +7 -8
  28. data/lib/rvg/misc.rb +13 -12
  29. data/lib/rvg/paint.rb +3 -4
  30. data/lib/rvg/pathdata.rb +3 -4
  31. data/lib/rvg/rvg.rb +3 -29
  32. data/lib/rvg/stretchable.rb +4 -5
  33. data/lib/rvg/stylable.rb +4 -5
  34. data/lib/rvg/text.rb +9 -10
  35. data/lib/rvg/transformable.rb +3 -4
  36. data/lib/rvg/units.rb +3 -2
  37. data/rmagick.gemspec +6 -4
  38. data/sig/rmagick.rbs +2 -1
  39. metadata +4 -19
  40. data/.devcontainer/Dockerfile +0 -14
  41. data/.devcontainer/ImageMagick6/devcontainer.json +0 -11
  42. data/.devcontainer/devcontainer.json +0 -11
  43. data/.devcontainer/setup-repo.sh +0 -10
  44. data/.devcontainer/setup-user.sh +0 -45
  45. data/.editorconfig +0 -17
  46. data/.github/ISSUE_TEMPLATE/report.yml +0 -40
  47. data/.github/ISSUE_TEMPLATE.md +0 -17
  48. data/.github/workflows/ci.yml +0 -264
  49. data/.gitignore +0 -29
  50. data/.rspec +0 -2
  51. data/.rubocop.yml +0 -68
  52. data/.rubocop_todo.yml +0 -596
  53. data/before_install_linux.sh +0 -61
  54. data/before_install_osx.sh +0 -60
@@ -1,14 +1,13 @@
1
- /**************************************************************************//**
2
- * Image class method definitions for RMagick.
3
- *
4
- * Copyright © 2002 - 2009 by Timothy P. Hunter
1
+ /**
2
+ * Image class methods.
5
3
  *
6
- * Changes since Nov. 2009 copyright © by Benjamin Thomas and Omer Bar-or
4
+ * Copyright (c) 2002 - 2009 Timothy P. Hunter
5
+ * Copyright (c) 2009 - Benjamin Thomas and Omer Bar-or
6
+ * Copyright (c) 2009 - RMagick contributors
7
7
  *
8
8
  * @file rmimage.cpp
9
- * @version $Id: rmimage.cpp,v 1.361 2010/05/03 03:34:48 baror Exp $
10
9
  * @author Tim Hunter
11
- ******************************************************************************/
10
+ */
12
11
 
13
12
  #include "rmagick.h"
14
13
  #include <signal.h>
@@ -224,6 +223,7 @@ DEFINE_GVL_STUB3(GammaImageChannel, Image *, const ChannelType, const double);
224
223
  DEFINE_GVL_STUB5(GaussianBlurImageChannel, const Image *, const ChannelType, const double, const double, ExceptionInfo *);
225
224
  DEFINE_GVL_STUB3(GetImageChannelDepth, const Image *, const ChannelType, ExceptionInfo *);
226
225
  DEFINE_GVL_STUB6(GetImageChannelDistortion, Image *, const Image *, const ChannelType, const MetricType, double *, ExceptionInfo *);
226
+ DEFINE_GVL_STUB4(GetImageChannelEntropy, const Image *, const ChannelType, double *, ExceptionInfo *);
227
227
  DEFINE_GVL_STUB5(GetImageChannelExtrema, const Image *, const ChannelType, size_t *, size_t *, ExceptionInfo *);
228
228
  DEFINE_GVL_STUB5(GetImageChannelMean, const Image *, const ChannelType, double *, double *, ExceptionInfo *);
229
229
  DEFINE_GVL_STUB2(GetImageClipMask, const Image *, ExceptionInfo *);
@@ -284,10 +284,6 @@ DEFINE_GVL_STUB2(WhiteThresholdImage, Image *, const char *);
284
284
  DEFINE_GVL_STUB2(WriteImage, const ImageInfo *, Image *);
285
285
  #endif
286
286
 
287
- #if defined(HAVE_GETIMAGECHANNELENTROPY)
288
- DEFINE_GVL_STUB4(GetImageChannelEntropy, const Image *, const ChannelType, double *, ExceptionInfo *);
289
- #endif
290
-
291
287
  DEFINE_GVL_STUB3(RotationalBlurImage, const Image *, const double, ExceptionInfo *);
292
288
 
293
289
  #if defined(IMAGEMAGICK_7)
@@ -300,22 +296,15 @@ DEFINE_GVL_STUB4(RotationalBlurImageChannel, const Image *, const ChannelType, c
300
296
  *
301
297
  * No Ruby usage (internal function)
302
298
  *
303
- * @hash the hash
299
+ * @kwargs the keyword arguments
304
300
  */
305
301
  static Quantum
306
- get_named_alpha_value(VALUE hash)
302
+ get_named_alpha_value(VALUE kwargs)
307
303
  {
308
- if (TYPE(hash) != T_HASH)
309
- {
310
- rb_raise(rb_eArgError, "missing keyword: alpha");
311
- }
312
-
313
- if (FIX2ULONG(rb_hash_size(hash)) != 1)
314
- {
315
- rb_raise(rb_eArgError, "wrong number of arguments");
316
- }
304
+ ID keyword_ids[] = { rb_intern("alpha") };
305
+ VALUE alpha;
317
306
 
318
- VALUE alpha = rb_hash_aref(hash, ID2SYM(rb_intern("alpha")));
307
+ rb_get_kwargs(kwargs, keyword_ids, 1, 0, &alpha);
319
308
  if (NIL_P(alpha))
320
309
  {
321
310
  rb_raise(rb_eArgError, "missing keyword: alpha");
@@ -2600,7 +2589,6 @@ Image_channel_mean(int argc, VALUE *argv, VALUE self)
2600
2589
  *
2601
2590
  * @return [Array<Float>] The first element in the array is the average entropy of the selected channels.
2602
2591
  */
2603
- #if defined(HAVE_GETIMAGECHANNELENTROPY) || defined(IMAGEMAGICK_7)
2604
2592
  VALUE
2605
2593
  Image_channel_entropy(int argc, VALUE *argv, VALUE self)
2606
2594
  {
@@ -2641,13 +2629,7 @@ Image_channel_entropy(int argc, VALUE *argv, VALUE self)
2641
2629
 
2642
2630
  return ary;
2643
2631
  }
2644
- #else
2645
- VALUE
2646
- Image_channel_entropy(int argc ATTRIBUTE_UNUSED, VALUE *argv ATTRIBUTE_UNUSED, VALUE self ATTRIBUTE_UNUSED)
2647
- {
2648
- rm_not_implemented();
2649
- }
2650
- #endif
2632
+
2651
2633
 
2652
2634
  /**
2653
2635
  * Return a new image that is a copy of the input image with the edges highlighted.
@@ -9366,25 +9348,23 @@ Image_matte_flood_fill(int argc, VALUE *argv, VALUE self)
9366
9348
  #if defined(IMAGEMAGICK_7)
9367
9349
  ExceptionInfo *exception;
9368
9350
  #endif
9351
+ VALUE color_obj, x_obj, y_obj, method_obj, kwargs;
9369
9352
 
9370
9353
  image = rm_check_destroyed(self);
9371
9354
 
9372
- if (argc != 5)
9373
- {
9374
- rb_raise(rb_eArgError, "wrong number of arguments (%d for 5)", argc);
9375
- }
9355
+ rb_scan_args(argc, argv, "4:", &color_obj, &x_obj, &y_obj, &method_obj, &kwargs);
9376
9356
 
9377
- alpha = get_named_alpha_value(argv[4]);
9357
+ alpha = get_named_alpha_value(kwargs);
9378
9358
 
9379
- Color_to_PixelColor(&target, argv[0]);
9380
- VALUE_TO_ENUM(argv[3], method, PaintMethod);
9359
+ Color_to_PixelColor(&target, color_obj);
9360
+ VALUE_TO_ENUM(method_obj, method, PaintMethod);
9381
9361
  if (!(method == FloodfillMethod || method == FillToBorderMethod))
9382
9362
  {
9383
9363
  rb_raise(rb_eArgError, "paint method_obj must be FloodfillMethod or "
9384
9364
  "FillToBorderMethod (%d given)", method);
9385
9365
  }
9386
- x = NUM2LONG(argv[1]);
9387
- y = NUM2LONG(argv[2]);
9366
+ x = NUM2LONG(x_obj);
9367
+ y = NUM2LONG(y_obj);
9388
9368
  if ((unsigned long)x > image->columns || (unsigned long)y > image->rows)
9389
9369
  {
9390
9370
  rb_raise(rb_eArgError, "target out of range. %ldx%ld given, image is %" RMIuSIZE "x%" RMIuSIZE "",
@@ -10479,41 +10459,18 @@ Image_paint_transparent(int argc, VALUE *argv, VALUE self)
10479
10459
  #if defined(IMAGEMAGICK_7)
10480
10460
  ExceptionInfo *exception;
10481
10461
  #endif
10462
+ VALUE color_obj, invert_obj, fuzz_obj, kwargs;
10482
10463
 
10483
10464
  image = rm_check_destroyed(self);
10484
10465
 
10485
- // Default fuzz value is image's fuzz attribute.
10486
- fuzz = image->fuzz;
10487
- invert = MagickFalse;
10466
+ rb_scan_args(argc, argv, "12:", &color_obj, &invert_obj, &fuzz_obj, &kwargs);
10488
10467
 
10489
- switch (argc)
10468
+ Color_to_MagickPixel(image, &color, color_obj);
10469
+ invert = (invert_obj != Qnil) ? (MagickBooleanType)RTEST(invert_obj) : MagickFalse;
10470
+ fuzz = (fuzz_obj != Qnil) ? NUM2DBL(fuzz_obj) : image->fuzz;
10471
+ if (RTEST(kwargs))
10490
10472
  {
10491
- case 4:
10492
- if (TYPE(argv[argc - 1]) == T_HASH)
10493
- {
10494
- fuzz = NUM2DBL(argv[2]);
10495
- }
10496
- else
10497
- {
10498
- fuzz = NUM2DBL(argv[3]);
10499
- }
10500
- case 3:
10501
- if (TYPE(argv[argc - 1]) == T_HASH)
10502
- {
10503
- invert = (MagickBooleanType)RTEST(argv[1]);
10504
- }
10505
- else
10506
- {
10507
- invert = (MagickBooleanType)RTEST(argv[2]);
10508
- }
10509
- case 2:
10510
- alpha = get_named_alpha_value(argv[argc - 1]);
10511
- case 1:
10512
- Color_to_MagickPixel(image, &color, argv[0]);
10513
- break;
10514
- default:
10515
- rb_raise(rb_eArgError, "wrong number of arguments (%d for 1 to 4)", argc);
10516
- break;
10473
+ alpha = get_named_alpha_value(kwargs);
10517
10474
  }
10518
10475
 
10519
10476
  new_image = rm_clone_image(image);
@@ -14215,31 +14172,33 @@ threshold_image(int argc, VALUE *argv, VALUE self, gvl_function_t fp)
14215
14172
  #if defined(IMAGEMAGICK_7)
14216
14173
  ExceptionInfo *exception;
14217
14174
  #endif
14175
+ VALUE red_obj, green_obj, blue_obj, kwargs;
14218
14176
 
14219
14177
  image = rm_check_destroyed(self);
14220
14178
 
14179
+ rb_scan_args(argc, argv, "12:", &red_obj, &green_obj, &blue_obj, &kwargs);
14221
14180
  switch (argc)
14222
14181
  {
14223
14182
  case 4:
14224
- red = NUM2DBL(argv[0]);
14225
- green = NUM2DBL(argv[1]);
14226
- blue = NUM2DBL(argv[2]);
14227
- alpha = get_named_alpha_value(argv[3]);
14183
+ red = NUM2DBL(red_obj);
14184
+ green = NUM2DBL(green_obj);
14185
+ blue = NUM2DBL(blue_obj);
14186
+ alpha = get_named_alpha_value(kwargs);
14228
14187
  snprintf(ctarg, sizeof(ctarg), "%f,%f,%f,%f", red, green, blue, QuantumRange - alpha);
14229
14188
  break;
14230
14189
  case 3:
14231
- red = NUM2DBL(argv[0]);
14232
- green = NUM2DBL(argv[1]);
14233
- blue = NUM2DBL(argv[2]);
14190
+ red = NUM2DBL(red_obj);
14191
+ green = NUM2DBL(green_obj);
14192
+ blue = NUM2DBL(blue_obj);
14234
14193
  snprintf(ctarg, sizeof(ctarg), "%f,%f,%f", red, green, blue);
14235
14194
  break;
14236
14195
  case 2:
14237
- red = NUM2DBL(argv[0]);
14238
- green = NUM2DBL(argv[1]);
14196
+ red = NUM2DBL(red_obj);
14197
+ green = NUM2DBL(green_obj);
14239
14198
  snprintf(ctarg, sizeof(ctarg), "%f,%f", red, green);
14240
14199
  break;
14241
14200
  case 1:
14242
- red = NUM2DBL(argv[0]);
14201
+ red = NUM2DBL(red_obj);
14243
14202
  snprintf(ctarg, sizeof(ctarg), "%f", red);
14244
14203
  break;
14245
14204
  default:
@@ -14704,20 +14663,15 @@ Image_transparent(int argc, VALUE *argv, VALUE self)
14704
14663
  #if defined(IMAGEMAGICK_7)
14705
14664
  ExceptionInfo *exception;
14706
14665
  #endif
14707
-
14666
+ VALUE color_obj, kwargs;
14708
14667
 
14709
14668
  image = rm_check_destroyed(self);
14710
14669
 
14711
- switch (argc)
14670
+ rb_scan_args(argc, argv, "1:", &color_obj, &kwargs);
14671
+ Color_to_MagickPixel(image, &color, color_obj);
14672
+ if (RTEST(kwargs))
14712
14673
  {
14713
- case 2:
14714
- alpha = get_named_alpha_value(argv[1]);
14715
- case 1:
14716
- Color_to_MagickPixel(image, &color, argv[0]);
14717
- break;
14718
- default:
14719
- rb_raise(rb_eArgError, "wrong number of arguments (%d for 1 or 2)", argc);
14720
- break;
14674
+ alpha = get_named_alpha_value(kwargs);
14721
14675
  }
14722
14676
 
14723
14677
  new_image = rm_clone_image(image);
@@ -14773,29 +14727,21 @@ Image_transparent_chroma(int argc, VALUE *argv, VALUE self)
14773
14727
  #if defined(IMAGEMAGICK_7)
14774
14728
  ExceptionInfo *exception;
14775
14729
  #endif
14730
+ VALUE low_obj, high_obj, invert_obj, kwargs;
14776
14731
 
14777
14732
  image = rm_check_destroyed(self);
14778
14733
 
14779
- switch (argc)
14734
+ rb_scan_args(argc, argv, "21:", &low_obj, &high_obj, &invert_obj, &kwargs);
14735
+
14736
+ Color_to_MagickPixel(image, &low, low_obj);
14737
+ Color_to_MagickPixel(image, &high, high_obj);
14738
+ if (invert_obj != Qnil)
14780
14739
  {
14781
- case 4:
14782
- if (TYPE(argv[argc - 1]) == T_HASH)
14783
- {
14784
- invert = (MagickBooleanType)RTEST(argv[3]);
14785
- }
14786
- else
14787
- {
14788
- invert = (MagickBooleanType)RTEST(argv[2]);
14789
- }
14790
- case 3:
14791
- alpha = get_named_alpha_value(argv[argc - 1]);
14792
- case 2:
14793
- Color_to_MagickPixel(image, &high, argv[1]);
14794
- Color_to_MagickPixel(image, &low, argv[0]);
14795
- break;
14796
- default:
14797
- rb_raise(rb_eArgError, "wrong number of arguments (%d for 2, 3 or 4)", argc);
14798
- break;
14740
+ invert = (MagickBooleanType)RTEST(invert_obj);
14741
+ }
14742
+ if (RTEST(kwargs))
14743
+ {
14744
+ alpha = get_named_alpha_value(kwargs);
14799
14745
  }
14800
14746
 
14801
14747
  new_image = rm_clone_image(image);
@@ -1,14 +1,13 @@
1
- /**************************************************************************//**
2
- * Info class method definitions for RMagick.
3
- *
4
- * Copyright &copy; 2002 - 2009 by Timothy P. Hunter
1
+ /**
2
+ * Info class methods.
5
3
  *
6
- * Changes since Nov. 2009 copyright &copy; by Benjamin Thomas and Omer Bar-or
4
+ * Copyright (c) 2002 - 2009 Timothy P. Hunter
5
+ * Copyright (c) 2009 - Benjamin Thomas and Omer Bar-or
6
+ * Copyright (c) 2009 - RMagick contributors
7
7
  *
8
8
  * @file rminfo.cpp
9
- * @version $Id: rminfo.cpp,v 1.79 2009/12/20 02:33:33 baror Exp $
10
9
  * @author Tim Hunter
11
- ******************************************************************************/
10
+ */
12
11
 
13
12
  #include "rmagick.h"
14
13
 
@@ -2417,4 +2416,3 @@ Info_initialize(VALUE self)
2417
2416
  }
2418
2417
  return self;
2419
2418
  }
2420
-
@@ -1,12 +1,13 @@
1
- /************************************************************************//**
2
- * KernelInfo class definitions for RMagick.
1
+ /**
2
+ * KernelInfo class methods.
3
3
  *
4
- * Copyright &copy; RMagick Project
4
+ * Copyright (c) 2002 - 2009 Timothy P. Hunter
5
+ * Copyright (c) 2009 - Benjamin Thomas and Omer Bar-or
6
+ * Copyright (c) 2009 - RMagick contributors
5
7
  *
6
- * @file rmkinfo.cpp
7
- * @version $Id: rmkinfo.cpp,v 1.0 2011/11/29 15:33:14 naquad Exp $
8
- * @author Naquad
9
- ****************************************************************************/
8
+ * @file rmkinfo.cpp
9
+ * @author Tim Hunter
10
+ */
10
11
 
11
12
  #include "rmagick.h"
12
13
 
@@ -1,15 +1,14 @@
1
- /**************************************************************************//**
2
- * Contains all module, class, method declarations. Defines all constants.
3
- * Contains Magick module methods.
4
- *
5
- * Copyright &copy; 2002 - 2009 by Timothy P. Hunter
1
+ /**
2
+ * All module, class, method declarations. Defines all constants.
3
+ * Magick module methods.
6
4
  *
7
- * Changes since Nov. 2009 copyright &copy; by Benjamin Thomas and Omer Bar-or
5
+ * Copyright (c) 2002 - 2009 Timothy P. Hunter
6
+ * Copyright (c) 2009 - Benjamin Thomas and Omer Bar-or
7
+ * Copyright (c) 2009 - RMagick contributors
8
8
  *
9
9
  * @file rmmain.cpp
10
- * @version $Id: rmmain.cpp,v 1.303 2009/12/20 02:33:33 baror Exp $
11
10
  * @author Tim Hunter
12
- ******************************************************************************/
11
+ */
13
12
 
14
13
  #define MAIN // Define external variables
15
14
  #include "rmagick.h"
@@ -209,18 +208,7 @@ static void set_managed_memory(void)
209
208
  return;
210
209
  }
211
210
 
212
- #if defined(_WIN32)
213
- #if defined(IMAGEMAGICK_GREATER_THAN_EQUAL_6_9_0)
214
- managed_memory_enable(Qtrue);
215
- #else
216
- // Disable managed memory feature with ImageMagick 6.8.x or below because causes crash.
217
- // Refer https://ci.appveyor.com/project/mockdeep/rmagick/builds/24706171
218
- managed_memory_enable(Qfalse);
219
- #endif
220
- #else
221
- // Not Windows
222
211
  managed_memory_enable(Qtrue);
223
- #endif
224
212
  }
225
213
 
226
214
 
@@ -1106,12 +1094,8 @@ Init_RMagick2(void)
1106
1094
  ENUMERATOR(YDbDrColorspace)
1107
1095
  ENUMERATORV(XyYColorspace, xyYColorspace)
1108
1096
  #if defined(IMAGEMAGICK_7)
1109
- #if defined(IMAGEMAGICK_GREATER_THAN_EQUAL_7_0_8)
1110
1097
  ENUMERATOR(LinearGRAYColorspace)
1111
- #endif
1112
- #if defined(IMAGEMAGICK_GREATER_THAN_EQUAL_7_0_10)
1113
1098
  ENUMERATOR(JzazbzColorspace)
1114
- #endif
1115
1099
  #elif defined(IMAGEMAGICK_GREATER_THAN_EQUAL_6_9_10)
1116
1100
  ENUMERATOR(LinearGRAYColorspace)
1117
1101
  #endif
@@ -1,14 +1,13 @@
1
- /**************************************************************************//**
2
- * Contains Montage class methods.
3
- *
4
- * Copyright &copy; 2002 - 2009 by Timothy P. Hunter
1
+ /**
2
+ * Montage class methods.
5
3
  *
6
- * Changes since Nov. 2009 copyright &copy; by Benjamin Thomas and Omer Bar-or
4
+ * Copyright (c) 2002 - 2009 Timothy P. Hunter
5
+ * Copyright (c) 2009 - Benjamin Thomas and Omer Bar-or
6
+ * Copyright (c) 2009 - RMagick contributors
7
7
  *
8
8
  * @file rmmontage.cpp
9
- * @version $Id: rmmontage.cpp,v 1.5 2009/12/20 02:33:33 baror Exp $
10
9
  * @author Tim Hunter
11
- ******************************************************************************/
10
+ */
12
11
 
13
12
  #include "rmagick.h"
14
13
 
@@ -471,4 +470,3 @@ rm_montage_new(void)
471
470
  {
472
471
  return Montage_initialize(Montage_alloc(Class_Montage));
473
472
  }
474
-
@@ -1,14 +1,13 @@
1
- /**************************************************************************//**
2
- * Contains Pixel class methods.
3
- *
4
- * Copyright &copy; 2002 - 2009 by Timothy P. Hunter
1
+ /**
2
+ * Pixel class methods.
5
3
  *
6
- * Changes since Nov. 2009 copyright &copy; by Benjamin Thomas and Omer Bar-or
4
+ * Copyright (c) 2002 - 2009 Timothy P. Hunter
5
+ * Copyright (c) 2009 - Benjamin Thomas and Omer Bar-or
6
+ * Copyright (c) 2009 - RMagick contributors
7
7
  *
8
8
  * @file rmpixel.cpp
9
- * @version $Id: rmpixel.cpp,v 1.7 2009/12/21 10:34:58 baror Exp $
10
9
  * @author Tim Hunter
11
- ******************************************************************************/
10
+ */
12
11
 
13
12
  #include "rmagick.h"
14
13
 
@@ -1,20 +1,17 @@
1
- /**************************************************************************//**
2
- * Contains various Struct class methods.
3
- *
4
- * Copyright &copy; 2002 - 2009 by Timothy P. Hunter
1
+ /**
2
+ * Various Struct class methods.
5
3
  *
6
- * Changes since Nov. 2009 copyright &copy; by Benjamin Thomas and Omer Bar-or
4
+ * Copyright (c) 2002 - 2009 Timothy P. Hunter
5
+ * Copyright (c) 2009 - Benjamin Thomas and Omer Bar-or
6
+ * Copyright (c) 2009 - RMagick contributors
7
7
  *
8
8
  * @file rmstruct.cpp
9
- * @version $Id: rmstruct.cpp,v 1.5 2009/12/20 02:33:34 baror Exp $
10
9
  * @author Tim Hunter
11
- ******************************************************************************/
10
+ */
12
11
 
13
12
  #include "rmagick.h"
14
13
 
15
14
 
16
-
17
-
18
15
  /**
19
16
  * Given a C AffineMatrix, create the equivalent AffineMatrix object.
20
17
  *
@@ -560,7 +557,7 @@ VALUE
560
557
  Import_PointInfo(PointInfo *p)
561
558
  {
562
559
  return rb_funcall(Class_Point, rm_ID_new, 2,
563
- INT2FIX(p->x), INT2FIX(p->y));
560
+ rb_float_new(p->x), rb_float_new(p->y));
564
561
  }
565
562
 
566
563
 
@@ -605,7 +602,7 @@ VALUE
605
602
  Import_PrimaryInfo(PrimaryInfo *p)
606
603
  {
607
604
  return rb_funcall(Class_Primary, rm_ID_new, 3,
608
- INT2FIX(p->x), INT2FIX(p->y), INT2FIX(p->z));
605
+ rb_float_new(p->x), rb_float_new(p->y), rb_float_new(p->z));
609
606
  }
610
607
 
611
608
 
@@ -941,4 +938,3 @@ TypeMetric_to_s(VALUE self)
941
938
 
942
939
  return str;
943
940
  }
944
-
@@ -1,14 +1,13 @@
1
- /**************************************************************************//**
2
- * Utility functions for RMagick.
3
- *
4
- * Copyright &copy; 2002 - 2009 by Timothy P. Hunter
1
+ /**
2
+ * Utility functions.
5
3
  *
6
- * Changes since Nov. 2009 copyright &copy; by Benjamin Thomas and Omer Bar-or
4
+ * Copyright (c) 2002 - 2009 Timothy P. Hunter
5
+ * Copyright (c) 2009 - Benjamin Thomas and Omer Bar-or
6
+ * Copyright (c) 2009 - RMagick contributors
7
7
  *
8
8
  * @file rmutil.cpp
9
- * @version $Id: rmutil.cpp,v 1.182 2009/12/21 10:34:58 baror Exp $
10
9
  * @author Tim Hunter
11
- ******************************************************************************/
10
+ */
12
11
 
13
12
  #include "rmagick.h"
14
13
  #include <errno.h>
@@ -777,26 +776,6 @@ rm_delete_temp_image(char *temp_name)
777
776
  }
778
777
 
779
778
 
780
- /**
781
- * Raise NotImplementedError.
782
- *
783
- * No Ruby usage (internal function)
784
- *
785
- * Notes:
786
- * - Called when a xMagick API is not available.
787
- * - Replaces Ruby's rb_notimplement function.
788
- *
789
- * @throw NotImpError
790
- */
791
- void
792
- rm_not_implemented(void)
793
- {
794
-
795
- rb_raise(rb_eNotImpError, "the `%s' method is not supported by ImageMagick "
796
- MagickLibVersionText, rb_id2name(rb_frame_this_func()));
797
- }
798
-
799
-
800
779
  /**
801
780
  * Create a new ImageMagickError object and raise an exception.
802
781
  *
@@ -1,7 +1,8 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Magick
4
- VERSION = '6.2.0'
5
- MIN_RUBY_VERSION = '3.0.0'
6
- MIN_IM_VERSION = '6.8.9'
4
+ VERSION = '7.0.0'
5
+ MIN_RUBY_VERSION = '3.2.0'
6
+ MIN_IM6_VERSION = '6.9.0'
7
+ MIN_IM7_VERSION = '7.1.0'
7
8
  end