rmagick 2.5.2 → 2.6.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.
- data/ChangeLog +29 -0
- data/README.html +7 -7
- data/doc/comtasks.html +2 -2
- data/doc/constants.html +22 -5
- data/doc/draw.html +2 -2
- data/doc/ex/affinity.rb +12 -0
- data/doc/ex/affinity_images.rb +21 -0
- data/doc/ex/composite_tiled.rb +23 -0
- data/doc/ex/images/Apple.miff +0 -0
- data/doc/ex/images/Leaf.miff +0 -0
- data/doc/ex/images/Rocks_On_Beach.miff +0 -0
- data/doc/ex/images/Yellow_Rose.miff +0 -0
- data/doc/ex/level_colors.rb +11 -0
- data/doc/ilist.html +72 -30
- data/doc/image1.html +305 -34
- data/doc/image2.html +144 -18
- data/doc/image3.html +111 -8
- data/doc/imageattrs.html +10 -2
- data/doc/imusage.html +5 -5
- data/doc/index.html +3 -3
- data/doc/info.html +2 -2
- data/doc/magick.html +2 -2
- data/doc/optequiv.html +54 -9
- data/doc/rvg.html +2 -2
- data/doc/rvgclip.html +2 -2
- data/doc/rvggroup.html +2 -2
- data/doc/rvgimage.html +2 -2
- data/doc/rvgpattern.html +2 -2
- data/doc/rvgshape.html +2 -2
- data/doc/rvgstyle.html +2 -2
- data/doc/rvgtext.html +2 -2
- data/doc/rvgtspan.html +2 -2
- data/doc/rvgtut.html +2 -2
- data/doc/rvguse.html +2 -2
- data/doc/rvgxform.html +2 -2
- data/doc/struct.html +2 -2
- data/doc/usage.html +27 -8
- data/ext/RMagick/MANIFEST +9 -3
- data/ext/RMagick/extconf.rb +19 -3
- data/ext/RMagick/rmagick.h +23 -7
- data/ext/RMagick/rmdraw.c +74 -22
- data/ext/RMagick/rmfill.c +2 -2
- data/ext/RMagick/rmilist.c +79 -29
- data/ext/RMagick/rmimage.c +904 -393
- data/ext/RMagick/rminfo.c +9 -9
- data/ext/RMagick/rmmain.c +64 -9
- data/ext/RMagick/rmutil.c +158 -44
- data/lib/RMagick.rb +32 -1
- data/rmagick.gemspec +1 -1
- metadata +10 -4
- data/doc/ex/map.rb +0 -28
- data/doc/ex/map_f.rb +0 -15
data/ext/RMagick/MANIFEST
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
MANIFEST for RMagick-2.
|
1
|
+
MANIFEST for RMagick-2.6.0 - 18:47:56 09/10/08
|
2
2
|
|
3
3
|
doc/ilist.html
|
4
4
|
doc/scripts/stripeTables.js
|
@@ -59,6 +59,7 @@ doc/ex/images/Red_Rocks.jpg
|
|
59
59
|
doc/ex/images/duck7.gif
|
60
60
|
doc/ex/images/Button_O.gif
|
61
61
|
doc/ex/images/Ballerina3.jpg
|
62
|
+
doc/ex/images/Rocks_On_Beach.miff
|
62
63
|
doc/ex/images/Button_U.gif
|
63
64
|
doc/ex/images/Violin.jpg
|
64
65
|
doc/ex/images/Button_L.gif
|
@@ -87,8 +88,11 @@ doc/ex/images/Button_G.gif
|
|
87
88
|
doc/ex/images/Button_1.gif
|
88
89
|
doc/ex/images/Shorts.jpg
|
89
90
|
doc/ex/images/Flower_Hat.jpg
|
91
|
+
doc/ex/images/Leaf.miff
|
90
92
|
doc/ex/images/Hot_Air_Balloons_H.jpg
|
93
|
+
doc/ex/images/Apple.miff
|
91
94
|
doc/ex/images/model.miff
|
95
|
+
doc/ex/images/Yellow_Rose.miff
|
92
96
|
doc/ex/images/Button_5.gif
|
93
97
|
doc/ex/images/Button_X.gif
|
94
98
|
doc/ex/images/Polynesia.jpg
|
@@ -191,6 +195,8 @@ doc/ex/median_filter.rb
|
|
191
195
|
doc/ex/rvg_clippath.rb
|
192
196
|
doc/ex/bounding_box.rb
|
193
197
|
doc/ex/pattern2.rb
|
198
|
+
doc/ex/affinity.rb
|
199
|
+
doc/ex/composite_tiled.rb
|
194
200
|
doc/ex/shave.rb
|
195
201
|
doc/ex/wave.rb
|
196
202
|
doc/ex/color_fill_to_border.rb
|
@@ -224,9 +230,10 @@ doc/ex/roll.rb
|
|
224
230
|
doc/ex/rect02.rb
|
225
231
|
doc/ex/rvg_opacity.rb
|
226
232
|
doc/ex/equalize.rb
|
227
|
-
doc/ex/map.rb
|
228
233
|
doc/ex/get_pixels.rb
|
229
234
|
doc/ex/polyline.rb
|
235
|
+
doc/ex/affinity_images.rb
|
236
|
+
doc/ex/level_colors.rb
|
230
237
|
doc/ex/composite_layers.rb
|
231
238
|
doc/ex/text01.rb
|
232
239
|
doc/ex/crop.rb
|
@@ -237,7 +244,6 @@ doc/ex/enhance.rb
|
|
237
244
|
doc/ex/tspan01.rb
|
238
245
|
doc/ex/flatten_images.rb
|
239
246
|
doc/ex/morph.rb
|
240
|
-
doc/ex/map_f.rb
|
241
247
|
doc/ex/implode.rb
|
242
248
|
doc/ex/tspan02.rb
|
243
249
|
doc/ex/cubic02.rb
|
data/ext/RMagick/extconf.rb
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
require "mkmf"
|
2
2
|
require "date"
|
3
3
|
|
4
|
-
RMAGICK_VERS = "2.
|
4
|
+
RMAGICK_VERS = "2.6.0"
|
5
5
|
MIN_RUBY_VERS = "1.8.2"
|
6
6
|
MIN_RUBY_VERS_NO = MIN_RUBY_VERS.tr(".","").to_i
|
7
7
|
MIN_IM_VERS = "6.3.0"
|
@@ -148,10 +148,13 @@ have_func("snprintf", headers)
|
|
148
148
|
|
149
149
|
|
150
150
|
["AcquireQuantumMemory", # 6.3.5-9
|
151
|
+
"AffinityImage", # 6.4.3-6
|
152
|
+
"AffinityImages", # 6.4.3-6
|
151
153
|
"ClutImageChannel", # 6.3.5-8
|
152
154
|
"CompositeLayers", # 6.3.3-?
|
153
155
|
"ConvertHSLToRGB", # 6.3.5-9
|
154
156
|
"ConvertRGBToHSL", # 6.3.5-9
|
157
|
+
"DeskewImage", # 6.4.2-5
|
155
158
|
"DistortImage", # 6.3.5
|
156
159
|
"EncipherImage", # 6.3.8-6
|
157
160
|
"EqualizeImageChannel", # 6.3.6-9
|
@@ -164,18 +167,23 @@ have_func("snprintf", headers)
|
|
164
167
|
"GetStringInfoDatum", # 6.3.2
|
165
168
|
"InterpretImageProperties", # 6.3.2
|
166
169
|
"IsHistogramImage", # 6.3.5
|
170
|
+
"LevelImageColors", # 6.4.2
|
171
|
+
"LevelizeImageChannel", # 6.4.2
|
167
172
|
"LinearStretchImage", # 6.3.1
|
168
173
|
"LiquidRescaleImage", # 6.3.8-2
|
169
174
|
"MagickCoreGenesis", # 6.3.4
|
170
175
|
"OpaquePaintImageChannel", # 6.3.7-10
|
171
176
|
"PolaroidImage", # 6.3.1-6
|
172
177
|
"RecolorImage", # 6.3.1-3
|
178
|
+
"RemoveImageArtifact", # 6.3.6
|
173
179
|
"ResetImagePage", # 6.3.3
|
174
180
|
"ResizeQuantumMemory", # 6.3.5-9
|
175
181
|
"SetImageAlphaChannel", # 6.3.6-9
|
182
|
+
"SetImageArtifact", # 6.3.6
|
176
183
|
"SetImageMask", # 6.3.1
|
177
184
|
"SetImageProperty", # 6.3.1
|
178
|
-
"SetImageRegistry", # 6.3.4
|
185
|
+
"SetImageRegistry", # 6.3.4
|
186
|
+
"SparseColorInterpolate", # 6.3.4-5
|
179
187
|
"SyncImageProfiles", # 6.3.2
|
180
188
|
"TransparentPaintImage", # 6.3.7-10
|
181
189
|
].each do |func|
|
@@ -212,6 +220,7 @@ end
|
|
212
220
|
|
213
221
|
have_struct_member("ImageInfo", "profile", headers) # 6.3.2
|
214
222
|
have_type("AlphaChannelType", headers) # 6.3.5
|
223
|
+
have_type("DitherMethod", headers) # 6.4.2
|
215
224
|
have_type("ImageLayerMethod", headers) # 6.3.6 replaces MagickLayerMethod
|
216
225
|
have_type("long double", headers)
|
217
226
|
have_type("unsigned long long", headers)
|
@@ -230,7 +239,12 @@ have_enum_values("CompressionType", ["DXT1Compression", # 6
|
|
230
239
|
"DXT3Compression", # 6.3.9-3
|
231
240
|
"DXT5Compression"], headers) # 6.3.9-3
|
232
241
|
have_enum_values("DistortImageMethod", ["ArcDistortion", # 6.3.5-5
|
233
|
-
|
242
|
+
"BarrelDistortion", # 6.4.2-5
|
243
|
+
"DePolarDistortion", # 6.4.2-6
|
244
|
+
"PerspectiveProjectionDistortion", # 6.3.5-9
|
245
|
+
"PolarDistortion", # 6.4.2-6
|
246
|
+
"PolynomialDistortion", # 6.4.2-4
|
247
|
+
"ShepardsDistortion"], headers) # 6.4.2-4
|
234
248
|
have_enum_values("FilterTypes", ["KaiserFilter", # 6.3.6
|
235
249
|
"WelshFilter", # 6.3.6-4
|
236
250
|
"ParzenFilter", # 6.3.6-4
|
@@ -256,6 +270,8 @@ have_enum_value("NoiseType", "RandomNoise", headers) # 6
|
|
256
270
|
have_enum_values("VirtualPixelMethod", ["MaskVirtualPixelMethod", # 6.3.3
|
257
271
|
"BlackVirtualPixelMethod", # 6.3.5
|
258
272
|
"GrayVirtualPixelMethod", # 6.3.5
|
273
|
+
"HorizontalTileVirtualPixelMethod", # 6.4.2-6
|
274
|
+
"VerticalTileVirtualPixelMethod", # 6.4.2-6
|
259
275
|
"WhiteVirtualPixelMethod"], headers) # 6.3.5
|
260
276
|
|
261
277
|
|
data/ext/RMagick/rmagick.h
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
/* $Id: rmagick.h,v 1.
|
1
|
+
/* $Id: rmagick.h,v 1.248 2008/09/02 23:40:18 rmagick Exp $ */
|
2
2
|
/*=============================================================================
|
3
3
|
| Copyright (C) 2008 by Timothy P. Hunter
|
4
4
|
| Name: rmagick.h
|
@@ -297,6 +297,9 @@ EXTERN VALUE Class_DisposeType;
|
|
297
297
|
#if defined(HAVE_DISTORTIMAGE)
|
298
298
|
EXTERN VALUE Class_DistortImageMethod;
|
299
299
|
#endif
|
300
|
+
#if defined(HAVE_TYPE_DITHERMETHOD)
|
301
|
+
EXTERN VALUE Class_DitherMethod;
|
302
|
+
#endif
|
300
303
|
EXTERN VALUE Class_EndianType;
|
301
304
|
EXTERN VALUE Class_FilterTypes;
|
302
305
|
EXTERN VALUE Class_GravityType;
|
@@ -310,6 +313,9 @@ EXTERN VALUE Class_PaintMethod;
|
|
310
313
|
EXTERN VALUE Class_PreviewType;
|
311
314
|
EXTERN VALUE Class_RenderingIntent;
|
312
315
|
EXTERN VALUE Class_ResolutionType;
|
316
|
+
#if defined(HAVE_SPARSECOLORINTERPOLATE)
|
317
|
+
EXTERN VALUE Class_SparseColorInterpolateMethod;
|
318
|
+
#endif
|
313
319
|
EXTERN VALUE Class_StorageType;
|
314
320
|
EXTERN VALUE Class_StretchType;
|
315
321
|
EXTERN VALUE Class_StyleType;
|
@@ -329,6 +335,7 @@ EXTERN ID rm_ID_flag; // "flag"
|
|
329
335
|
EXTERN ID rm_ID_from_s; // "from_s"
|
330
336
|
EXTERN ID rm_ID_Geometry; // "Geometry"
|
331
337
|
EXTERN ID rm_ID_GeometryValue; // "GeometryValue"
|
338
|
+
EXTERN ID rm_ID_has_key_q; // "has_key?"
|
332
339
|
EXTERN ID rm_ID_height; // "height"
|
333
340
|
EXTERN ID rm_ID_initialize_copy; // "initialize_copy"
|
334
341
|
EXTERN ID rm_ID_length; // "length"
|
@@ -616,6 +623,7 @@ ATTR_WRITER(PolaroidOptions, border_color);
|
|
616
623
|
|
617
624
|
|
618
625
|
// rmilist.c
|
626
|
+
extern VALUE ImageList_affinity(int, VALUE *, VALUE);
|
619
627
|
extern VALUE ImageList_animate(int, VALUE *, VALUE);
|
620
628
|
extern VALUE ImageList_append(VALUE, VALUE);
|
621
629
|
extern VALUE ImageList_average(VALUE);
|
@@ -767,6 +775,7 @@ ATTR_ACCESSOR(Image, y_resolution)
|
|
767
775
|
|
768
776
|
extern ChannelType extract_channels(int *, VALUE *);
|
769
777
|
extern void raise_ChannelType_error(VALUE);
|
778
|
+
extern void add_format_prefix(Info *, VALUE);
|
770
779
|
|
771
780
|
extern VALUE Image_alloc(VALUE);
|
772
781
|
extern VALUE Image_initialize(int, VALUE *, VALUE);
|
@@ -781,6 +790,7 @@ extern VALUE Image_add_noise(VALUE, VALUE);
|
|
781
790
|
extern VALUE Image_add_noise_channel(int, VALUE *, VALUE);
|
782
791
|
extern VALUE Image_add_profile(VALUE, VALUE);
|
783
792
|
extern VALUE Image_affine_transform(VALUE, VALUE);
|
793
|
+
extern VALUE Image_affinity(int, VALUE *, VALUE);
|
784
794
|
extern VALUE Image_alpha(int, VALUE *, VALUE);
|
785
795
|
extern VALUE Image_alpha_q(VALUE);
|
786
796
|
extern VALUE Image_aref(VALUE, VALUE);
|
@@ -814,10 +824,12 @@ extern VALUE Image_colorize(int, VALUE *, VALUE);
|
|
814
824
|
extern VALUE Image_colormap(int, VALUE *, VALUE);
|
815
825
|
extern VALUE Image_combine(int, VALUE *, VALUE);
|
816
826
|
extern VALUE Image_composite(int, VALUE *, VALUE);
|
827
|
+
extern VALUE Image_composite_affine(VALUE, VALUE, VALUE);
|
817
828
|
extern VALUE Image_composite_bang(int, VALUE *, VALUE);
|
818
829
|
extern VALUE Image_composite_channel(int, VALUE *, VALUE);
|
819
830
|
extern VALUE Image_composite_channel_bang(int, VALUE *, VALUE);
|
820
|
-
extern VALUE
|
831
|
+
extern VALUE Image_composite_tiled(int, VALUE *, VALUE);
|
832
|
+
extern VALUE Image_composite_tiled_bang(int, VALUE *, VALUE);
|
821
833
|
extern VALUE Image_compress_colormap_bang(VALUE);
|
822
834
|
extern VALUE Image_constitute(VALUE, VALUE, VALUE, VALUE, VALUE);
|
823
835
|
extern VALUE Image_contrast(int, VALUE *, VALUE);
|
@@ -829,8 +841,10 @@ extern VALUE Image_crop(int, VALUE *, VALUE);
|
|
829
841
|
extern VALUE Image_crop_bang(int, VALUE *, VALUE);
|
830
842
|
extern VALUE Image_cycle_colormap(VALUE, VALUE);
|
831
843
|
extern VALUE Image_decipher(VALUE, VALUE);
|
844
|
+
extern VALUE Image_define(VALUE, VALUE, VALUE);
|
832
845
|
extern VALUE Image_delete_profile(VALUE, VALUE);
|
833
846
|
extern VALUE Image_delete_compose_mask(VALUE);
|
847
|
+
extern VALUE Image_deskew(int, VALUE *, VALUE);
|
834
848
|
extern VALUE Image_despeckle(VALUE);
|
835
849
|
extern VALUE Image_destroy_bang(VALUE);
|
836
850
|
extern VALUE Image_destroyed_q(VALUE);
|
@@ -876,6 +890,8 @@ extern VALUE Image_init_copy(VALUE, VALUE);
|
|
876
890
|
extern VALUE Image_inspect(VALUE);
|
877
891
|
extern VALUE Image_level2(int, VALUE *, VALUE);
|
878
892
|
extern VALUE Image_level_channel(int, VALUE *, VALUE);
|
893
|
+
extern VALUE Image_level_colors(int, VALUE *, VALUE);
|
894
|
+
extern VALUE Image_levelize_channel(int, VALUE *, VALUE);
|
879
895
|
extern VALUE Image_linear_stretch(int, VALUE *, VALUE);
|
880
896
|
extern VALUE Image_liquid_rescale(int, VALUE *, VALUE);
|
881
897
|
extern VALUE Image__load(VALUE, VALUE);
|
@@ -943,6 +959,7 @@ extern VALUE Image_signature(VALUE);
|
|
943
959
|
extern VALUE Image_sketch(int, VALUE *, VALUE);
|
944
960
|
extern VALUE Image_solarize(int, VALUE *, VALUE);
|
945
961
|
extern VALUE Image_spaceship(VALUE, VALUE);
|
962
|
+
extern VALUE Image_sparse_color(int, VALUE *, VALUE);
|
946
963
|
extern VALUE Image_splice(int, VALUE *, VALUE);
|
947
964
|
extern VALUE Image_spread(int, VALUE *, VALUE);
|
948
965
|
extern VALUE Image_stegano(VALUE, VALUE, VALUE);
|
@@ -965,6 +982,7 @@ extern VALUE Image_transverse(VALUE);
|
|
965
982
|
extern VALUE Image_transverse_bang(VALUE);
|
966
983
|
extern VALUE Image_trim(int, VALUE *, VALUE);
|
967
984
|
extern VALUE Image_trim_bang(int, VALUE *, VALUE);
|
985
|
+
extern VALUE Image_undefine(VALUE, VALUE);
|
968
986
|
extern VALUE Image_unique_colors(VALUE);
|
969
987
|
extern VALUE Image_unsharp_mask(int, VALUE *, VALUE);
|
970
988
|
extern VALUE Image_unsharp_mask_channel(int, VALUE *, VALUE);
|
@@ -1006,7 +1024,7 @@ extern VALUE EndianType_new(EndianType);
|
|
1006
1024
|
extern VALUE FilterTypes_new(FilterTypes);
|
1007
1025
|
extern VALUE GravityType_new(GravityType);
|
1008
1026
|
extern VALUE Font_to_s(VALUE);
|
1009
|
-
extern VALUE
|
1027
|
+
extern VALUE rm_cur_image(VALUE);
|
1010
1028
|
extern VALUE ImageMagickError_initialize(int, VALUE *, VALUE);
|
1011
1029
|
extern VALUE ImageType_new(ImageType);
|
1012
1030
|
extern VALUE InterlaceType_new(InterlaceType);
|
@@ -1087,15 +1105,12 @@ extern void *magick_safe_realloc(void *, const size_t, const size_t);
|
|
1087
1105
|
extern void magick_clone_string(char **, const char *);
|
1088
1106
|
extern VALUE rm_enum_new(VALUE, VALUE, VALUE);
|
1089
1107
|
extern VALUE rm_no_freeze(VALUE);
|
1090
|
-
#if !defined(StringValuePtr)
|
1091
|
-
extern char *rm_string_value_ptr(volatile VALUE *);
|
1092
|
-
#endif
|
1093
|
-
extern char *rm_string_value_ptr_len(volatile VALUE *, long *);
|
1094
1108
|
extern int rm_strcasecmp(const char *, const char *);
|
1095
1109
|
extern int rm_strncasecmp(const char *, const char *, size_t);
|
1096
1110
|
extern void rm_check_ary_len(VALUE, long);
|
1097
1111
|
extern Image *rm_check_destroyed(VALUE);
|
1098
1112
|
extern Image *rm_check_frozen(VALUE);
|
1113
|
+
extern VALUE rm_to_s(VALUE);
|
1099
1114
|
extern char *rm_str2cstr(VALUE, long *);
|
1100
1115
|
extern int rm_check_num2dbl(VALUE);
|
1101
1116
|
extern double rm_fuzz_to_dbl(VALUE);
|
@@ -1126,6 +1141,7 @@ extern Image *rm_clone_image(Image *);
|
|
1126
1141
|
extern MagickBooleanType rm_progress_monitor(const char *, const MagickOffsetType, const MagickSizeType, void *);
|
1127
1142
|
extern VALUE rm_exif_by_entry(Image *);
|
1128
1143
|
extern VALUE rm_exif_by_number(Image *);
|
1144
|
+
extern void rm_get_optional_arguments(VALUE);
|
1129
1145
|
|
1130
1146
|
#endif
|
1131
1147
|
|
data/ext/RMagick/rmdraw.c
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
/* $Id: rmdraw.c,v 1.
|
1
|
+
/* $Id: rmdraw.c,v 1.67 2008/09/03 00:08:35 rmagick Exp $ */
|
2
2
|
/*============================================================================\
|
3
3
|
| Copyright (C) 2008 by Timothy P. Hunter
|
4
4
|
| Name: rmdraw.c
|
@@ -34,6 +34,7 @@ Draw_affine_eq(VALUE self, VALUE matrix)
|
|
34
34
|
return self;
|
35
35
|
}
|
36
36
|
|
37
|
+
|
37
38
|
/*
|
38
39
|
Method: Draw#align=
|
39
40
|
Purpose: set the text alignment
|
@@ -49,6 +50,7 @@ Draw_align_eq(VALUE self, VALUE align)
|
|
49
50
|
return self;
|
50
51
|
}
|
51
52
|
|
53
|
+
|
52
54
|
/*
|
53
55
|
Method: Draw#decorate=
|
54
56
|
Purpose: decorate attribute writer
|
@@ -64,6 +66,7 @@ Draw_decorate_eq(VALUE self, VALUE decorate)
|
|
64
66
|
return self;
|
65
67
|
}
|
66
68
|
|
69
|
+
|
67
70
|
/*
|
68
71
|
Method: Draw#density=
|
69
72
|
Purpose: density attribute writer
|
@@ -80,6 +83,7 @@ Draw_density_eq(VALUE self, VALUE density)
|
|
80
83
|
return self;
|
81
84
|
}
|
82
85
|
|
86
|
+
|
83
87
|
/*
|
84
88
|
Method: Draw#encoding=
|
85
89
|
Purpose: encoding attribute writer
|
@@ -96,6 +100,7 @@ Draw_encoding_eq(VALUE self, VALUE encoding)
|
|
96
100
|
return self;
|
97
101
|
}
|
98
102
|
|
103
|
+
|
99
104
|
/*
|
100
105
|
Method: Draw#fill=
|
101
106
|
Purpose: fill attribute writer
|
@@ -111,6 +116,7 @@ Draw_fill_eq(VALUE self, VALUE fill)
|
|
111
116
|
return self;
|
112
117
|
}
|
113
118
|
|
119
|
+
|
114
120
|
/*
|
115
121
|
Method: Draw#fill_pattern=
|
116
122
|
Purpose: Accept an image as a fill pattern
|
@@ -134,7 +140,7 @@ Draw_fill_pattern_eq(VALUE self, VALUE pattern)
|
|
134
140
|
|
135
141
|
if (!NIL_P(pattern))
|
136
142
|
{
|
137
|
-
pattern =
|
143
|
+
pattern = rm_cur_image(pattern);
|
138
144
|
image = rm_check_destroyed(pattern);
|
139
145
|
// Do not trace creation
|
140
146
|
draw->info->fill_pattern = rm_clone_image(image);
|
@@ -143,6 +149,7 @@ Draw_fill_pattern_eq(VALUE self, VALUE pattern)
|
|
143
149
|
return self;
|
144
150
|
}
|
145
151
|
|
152
|
+
|
146
153
|
/*
|
147
154
|
Method: Draw#font=
|
148
155
|
Purpose: font attribute writer
|
@@ -159,6 +166,7 @@ Draw_font_eq(VALUE self, VALUE font)
|
|
159
166
|
return self;
|
160
167
|
}
|
161
168
|
|
169
|
+
|
162
170
|
/*
|
163
171
|
Method: Draw#font_family=
|
164
172
|
Purpose: font_family attribute writer
|
@@ -175,6 +183,7 @@ Draw_font_family_eq(VALUE self, VALUE family)
|
|
175
183
|
return self;
|
176
184
|
}
|
177
185
|
|
186
|
+
|
178
187
|
/*
|
179
188
|
Method: Draw#font_stretch=
|
180
189
|
Purpose: font_stretch attribute writer
|
@@ -190,6 +199,7 @@ Draw_font_stretch_eq(VALUE self, VALUE stretch)
|
|
190
199
|
return self;
|
191
200
|
}
|
192
201
|
|
202
|
+
|
193
203
|
/*
|
194
204
|
Method: Draw#font_style=
|
195
205
|
Purpose: font_style attribute writer
|
@@ -205,14 +215,13 @@ Draw_font_style_eq(VALUE self, VALUE style)
|
|
205
215
|
return self;
|
206
216
|
}
|
207
217
|
|
218
|
+
|
208
219
|
/*
|
209
220
|
Method: Draw#font_weight=
|
210
221
|
Purpose: font_weight attribute writer
|
211
222
|
Notes: The font weight can be one of the font weight constants
|
212
223
|
or a number between 100 and 900
|
213
224
|
*/
|
214
|
-
|
215
|
-
|
216
225
|
VALUE
|
217
226
|
Draw_font_weight_eq(VALUE self, VALUE weight)
|
218
227
|
{
|
@@ -262,6 +271,7 @@ Draw_font_weight_eq(VALUE self, VALUE weight)
|
|
262
271
|
return self;
|
263
272
|
}
|
264
273
|
|
274
|
+
|
265
275
|
/*
|
266
276
|
Method: Draw#gravity=
|
267
277
|
Purpose: gravity attribute writer
|
@@ -289,6 +299,7 @@ Draw_gravity_eq(VALUE self, VALUE grav)
|
|
289
299
|
return self;
|
290
300
|
}
|
291
301
|
|
302
|
+
|
292
303
|
/*
|
293
304
|
Method: Draw#pointsize=
|
294
305
|
Purpose: pointsize attribute writer
|
@@ -304,6 +315,7 @@ Draw_pointsize_eq(VALUE self, VALUE pointsize)
|
|
304
315
|
return self;
|
305
316
|
}
|
306
317
|
|
318
|
+
|
307
319
|
/*
|
308
320
|
Method: Magick::Draw#rotation=degrees
|
309
321
|
Purpose: set rotation attribute value
|
@@ -346,6 +358,7 @@ Draw_rotation_eq(VALUE self, VALUE deg)
|
|
346
358
|
return self;
|
347
359
|
}
|
348
360
|
|
361
|
+
|
349
362
|
/*
|
350
363
|
Method: Draw#stroke=
|
351
364
|
Purpose: stroke attribute writer
|
@@ -361,6 +374,7 @@ Draw_stroke_eq(VALUE self, VALUE stroke)
|
|
361
374
|
return self;
|
362
375
|
}
|
363
376
|
|
377
|
+
|
364
378
|
/*
|
365
379
|
Method: Draw#stroke_pattern=
|
366
380
|
Purpose: Accept an image as a stroke pattern
|
@@ -385,7 +399,7 @@ Draw_stroke_pattern_eq(VALUE self, VALUE pattern)
|
|
385
399
|
if (!NIL_P(pattern))
|
386
400
|
{
|
387
401
|
// DestroyDrawInfo destroys the clone
|
388
|
-
pattern =
|
402
|
+
pattern = rm_cur_image(pattern);
|
389
403
|
image = rm_check_destroyed(pattern);
|
390
404
|
// Do not trace creation
|
391
405
|
draw->info->stroke_pattern = rm_clone_image(image);
|
@@ -394,6 +408,7 @@ Draw_stroke_pattern_eq(VALUE self, VALUE pattern)
|
|
394
408
|
return self;
|
395
409
|
}
|
396
410
|
|
411
|
+
|
397
412
|
/*
|
398
413
|
Method: Draw#stroke_width=
|
399
414
|
Purpose: stroke_width attribute writer
|
@@ -409,6 +424,7 @@ Draw_stroke_width_eq(VALUE self, VALUE stroke_width)
|
|
409
424
|
return self;
|
410
425
|
}
|
411
426
|
|
427
|
+
|
412
428
|
/*
|
413
429
|
Method: Draw#text_antialias=
|
414
430
|
Purpose: text_antialias attribute writer
|
@@ -424,6 +440,7 @@ Draw_text_antialias_eq(VALUE self, VALUE text_antialias)
|
|
424
440
|
return self;
|
425
441
|
}
|
426
442
|
|
443
|
+
|
427
444
|
/*
|
428
445
|
Method: Draw#tile=
|
429
446
|
Purpose: tile attribute writer
|
@@ -434,6 +451,7 @@ Draw_tile_eq(VALUE self, VALUE image)
|
|
434
451
|
return Draw_fill_pattern_eq(self, image);
|
435
452
|
}
|
436
453
|
|
454
|
+
|
437
455
|
/*
|
438
456
|
Method: Draw#undercolor=
|
439
457
|
Purpose: undercolor attribute writer
|
@@ -449,6 +467,7 @@ Draw_undercolor_eq(VALUE self, VALUE undercolor)
|
|
449
467
|
return self;
|
450
468
|
}
|
451
469
|
|
470
|
+
|
452
471
|
/*
|
453
472
|
Method: Draw#annotate(img, w, h, x, y, text) <{optional parms}>
|
454
473
|
Purpose: annotates an image with text
|
@@ -478,7 +497,7 @@ VALUE Draw_annotate(
|
|
478
497
|
Data_Get_Struct(self, Draw, draw);
|
479
498
|
keep = draw->info->affine;
|
480
499
|
|
481
|
-
image_arg =
|
500
|
+
image_arg = rm_cur_image(image_arg);
|
482
501
|
image = rm_check_frozen(image_arg);
|
483
502
|
|
484
503
|
// If we have an optional parm block, run it in self's context,
|
@@ -576,7 +595,7 @@ Draw_composite(int argc, VALUE *argv, VALUE self)
|
|
576
595
|
}
|
577
596
|
|
578
597
|
// Retrieve the image to composite
|
579
|
-
image =
|
598
|
+
image = rm_cur_image(argv[4]);
|
580
599
|
(void) rm_check_destroyed(image);
|
581
600
|
|
582
601
|
x = NUM2DBL(argv[0]);
|
@@ -675,6 +694,7 @@ Draw_composite(int argc, VALUE *argv, VALUE self)
|
|
675
694
|
return self;
|
676
695
|
}
|
677
696
|
|
697
|
+
|
678
698
|
/*
|
679
699
|
Method: Draw#draw(i)
|
680
700
|
Purpose: Execute the stored drawing primitives on the current image
|
@@ -686,7 +706,7 @@ Draw_draw(VALUE self, VALUE image_arg)
|
|
686
706
|
Draw *draw;
|
687
707
|
Image *image;
|
688
708
|
|
689
|
-
image_arg =
|
709
|
+
image_arg = rm_cur_image(image_arg);
|
690
710
|
image = rm_check_frozen(image_arg);
|
691
711
|
|
692
712
|
Data_Get_Struct(self, Draw, draw);
|
@@ -757,6 +777,7 @@ Draw_get_multiline_type_metrics(
|
|
757
777
|
return get_type_metrics(argc, argv, self, GetMultilineTypeMetrics);
|
758
778
|
}
|
759
779
|
|
780
|
+
|
760
781
|
/*
|
761
782
|
Method: Draw#initialize_copy
|
762
783
|
Purpose: initialize clone, dup methods
|
@@ -803,6 +824,7 @@ Draw_initialize(VALUE self)
|
|
803
824
|
return self;
|
804
825
|
}
|
805
826
|
|
827
|
+
|
806
828
|
/*
|
807
829
|
Method: inspect
|
808
830
|
Purpose: display the primitives
|
@@ -816,12 +838,12 @@ Draw_inspect(VALUE self)
|
|
816
838
|
return draw->primitives ? draw->primitives : rb_str_new2("(no primitives defined)");
|
817
839
|
}
|
818
840
|
|
841
|
+
|
819
842
|
/*
|
820
843
|
Method: Draw.new/Draw.allocate
|
821
844
|
Purpose: Create a new Draw object
|
822
845
|
Raises: ImageMagickError if no memory
|
823
846
|
*/
|
824
|
-
|
825
847
|
VALUE Draw_alloc(VALUE class)
|
826
848
|
{
|
827
849
|
Draw *draw;
|
@@ -834,6 +856,7 @@ VALUE Draw_alloc(VALUE class)
|
|
834
856
|
return draw_obj;
|
835
857
|
}
|
836
858
|
|
859
|
+
|
837
860
|
/*
|
838
861
|
Method: Draw#primitive
|
839
862
|
Purpose: Add a drawing primitive to the list of primitives in the
|
@@ -860,6 +883,7 @@ Draw_primitive(VALUE self, VALUE primitive)
|
|
860
883
|
return self;
|
861
884
|
}
|
862
885
|
|
886
|
+
|
863
887
|
/*
|
864
888
|
Static: mark_Draw
|
865
889
|
Purpose: mark referenced objects
|
@@ -875,6 +899,7 @@ mark_Draw(void *drawptr)
|
|
875
899
|
}
|
876
900
|
}
|
877
901
|
|
902
|
+
|
878
903
|
/*
|
879
904
|
Static: destroy_Draw
|
880
905
|
Purpose: free the memory associated with an Draw object
|
@@ -908,7 +933,8 @@ destroy_Draw(void *drawptr)
|
|
908
933
|
Static: new_DrawOptions
|
909
934
|
Purpose: Allocate & initialize a DrawOptions object.
|
910
935
|
*/
|
911
|
-
static VALUE
|
936
|
+
static VALUE
|
937
|
+
new_DrawOptions(void)
|
912
938
|
{
|
913
939
|
return DrawOptions_initialize(Draw_alloc(Class_DrawOptions));
|
914
940
|
}
|
@@ -921,7 +947,8 @@ static VALUE new_DrawOptions(void)
|
|
921
947
|
Notes: The DrawOptions class is the same as the Draw class except
|
922
948
|
is has only the attribute writer functions.
|
923
949
|
*/
|
924
|
-
VALUE
|
950
|
+
VALUE
|
951
|
+
DrawOptions_alloc(VALUE class)
|
925
952
|
{
|
926
953
|
Draw *draw_options;
|
927
954
|
volatile VALUE draw_options_obj;
|
@@ -938,7 +965,8 @@ VALUE DrawOptions_alloc(VALUE class)
|
|
938
965
|
Method: DrawOptions#initialize
|
939
966
|
Purpose: Initialize a DrawOptions object
|
940
967
|
*/
|
941
|
-
VALUE
|
968
|
+
VALUE
|
969
|
+
DrawOptions_initialize(VALUE self)
|
942
970
|
{
|
943
971
|
Draw *draw_options;
|
944
972
|
|
@@ -975,6 +1003,7 @@ Montage_background_color_eq(VALUE self, VALUE color)
|
|
975
1003
|
return self;
|
976
1004
|
}
|
977
1005
|
|
1006
|
+
|
978
1007
|
/*
|
979
1008
|
Method: Magick::Montage#border_color(color-name)
|
980
1009
|
Purpose: set border_color value
|
@@ -989,6 +1018,7 @@ Montage_border_color_eq(VALUE self, VALUE color)
|
|
989
1018
|
return self;
|
990
1019
|
}
|
991
1020
|
|
1021
|
+
|
992
1022
|
/*
|
993
1023
|
Method: Magick::Montage#border_width(width)
|
994
1024
|
Purpose: set border_width value
|
@@ -1003,6 +1033,7 @@ Montage_border_width_eq(VALUE self, VALUE width)
|
|
1003
1033
|
return self;
|
1004
1034
|
}
|
1005
1035
|
|
1036
|
+
|
1006
1037
|
/*
|
1007
1038
|
Method: Magick::Montage#compose(width)
|
1008
1039
|
Purpose: set a composition operator
|
@@ -1017,6 +1048,7 @@ Montage_compose_eq(VALUE self, VALUE compose)
|
|
1017
1048
|
return self;
|
1018
1049
|
}
|
1019
1050
|
|
1051
|
+
|
1020
1052
|
/*
|
1021
1053
|
Method: Magick::Montage#filename(name)
|
1022
1054
|
Purpose: set filename value
|
@@ -1031,6 +1063,7 @@ Montage_filename_eq(VALUE self, VALUE filename)
|
|
1031
1063
|
return self;
|
1032
1064
|
}
|
1033
1065
|
|
1066
|
+
|
1034
1067
|
/*
|
1035
1068
|
Method: Magick::Montage#fill(color-name)
|
1036
1069
|
Purpose: set fill value
|
@@ -1045,6 +1078,7 @@ Montage_fill_eq(VALUE self, VALUE color)
|
|
1045
1078
|
return self;
|
1046
1079
|
}
|
1047
1080
|
|
1081
|
+
|
1048
1082
|
/*
|
1049
1083
|
Method: Magick::Montage#font(font-name)
|
1050
1084
|
Purpose: set font value
|
@@ -1060,6 +1094,7 @@ Montage_font_eq(VALUE self, VALUE font)
|
|
1060
1094
|
return self;
|
1061
1095
|
}
|
1062
1096
|
|
1097
|
+
|
1063
1098
|
/*
|
1064
1099
|
Method: Magick::Montage#frame(frame-geometry)
|
1065
1100
|
Purpose: set frame value
|
@@ -1074,12 +1109,13 @@ Montage_frame_eq(VALUE self, VALUE frame_arg)
|
|
1074
1109
|
volatile VALUE frame;
|
1075
1110
|
|
1076
1111
|
Data_Get_Struct(self, Montage, montage);
|
1077
|
-
frame =
|
1112
|
+
frame = rm_to_s(frame_arg);
|
1078
1113
|
magick_clone_string(&montage->info->frame, StringValuePtr(frame));
|
1079
1114
|
|
1080
1115
|
return self;
|
1081
1116
|
}
|
1082
1117
|
|
1118
|
+
|
1083
1119
|
/*
|
1084
1120
|
Method: Magick::Montage#geometry(geometry)
|
1085
1121
|
Purpose: set geometry value
|
@@ -1091,12 +1127,13 @@ Montage_geometry_eq(VALUE self, VALUE geometry_arg)
|
|
1091
1127
|
volatile VALUE geometry;
|
1092
1128
|
|
1093
1129
|
Data_Get_Struct(self, Montage, montage);
|
1094
|
-
geometry =
|
1130
|
+
geometry = rm_to_s(geometry_arg);
|
1095
1131
|
magick_clone_string(&montage->info->geometry, StringValuePtr(geometry));
|
1096
1132
|
|
1097
1133
|
return self;
|
1098
1134
|
}
|
1099
1135
|
|
1136
|
+
|
1100
1137
|
/*
|
1101
1138
|
Method: Magick::Montage#gravity(gravity-type)
|
1102
1139
|
Purpose: set gravity value
|
@@ -1111,6 +1148,7 @@ Montage_gravity_eq(VALUE self, VALUE gravity)
|
|
1111
1148
|
return self;
|
1112
1149
|
}
|
1113
1150
|
|
1151
|
+
|
1114
1152
|
/*
|
1115
1153
|
Method: Magick::Montage#initialize
|
1116
1154
|
Purpose: Place-holder
|
@@ -1122,6 +1160,7 @@ Montage_initialize(VALUE self)
|
|
1122
1160
|
return self;
|
1123
1161
|
}
|
1124
1162
|
|
1163
|
+
|
1125
1164
|
/*
|
1126
1165
|
Method: Magick::Montage#matte_color(color-name)
|
1127
1166
|
Purpose: set matte_color value
|
@@ -1136,6 +1175,7 @@ Montage_matte_color_eq(VALUE self, VALUE color)
|
|
1136
1175
|
return self;
|
1137
1176
|
}
|
1138
1177
|
|
1178
|
+
|
1139
1179
|
/*
|
1140
1180
|
Method: Montage.new
|
1141
1181
|
Purpose: Create a new Montage object
|
@@ -1171,12 +1211,14 @@ Montage_alloc(VALUE class)
|
|
1171
1211
|
return montage_obj;
|
1172
1212
|
}
|
1173
1213
|
|
1214
|
+
|
1174
1215
|
/*
|
1175
1216
|
Extern: rm_montage_new()
|
1176
1217
|
Purpose: Return a new Magick::Montage object
|
1177
1218
|
*/
|
1178
1219
|
|
1179
|
-
VALUE
|
1220
|
+
VALUE
|
1221
|
+
rm_montage_new(void)
|
1180
1222
|
{
|
1181
1223
|
return Montage_initialize(Montage_alloc(Class_Montage));
|
1182
1224
|
}
|
@@ -1207,6 +1249,7 @@ destroy_Montage(void *obj)
|
|
1207
1249
|
xfree(montage);
|
1208
1250
|
}
|
1209
1251
|
|
1252
|
+
|
1210
1253
|
/*
|
1211
1254
|
Method: Magick::Montage#pointsize=size
|
1212
1255
|
Purpose: set pointsize value
|
@@ -1221,6 +1264,7 @@ Montage_pointsize_eq(VALUE self, VALUE size)
|
|
1221
1264
|
return self;
|
1222
1265
|
}
|
1223
1266
|
|
1267
|
+
|
1224
1268
|
/*
|
1225
1269
|
Method: Magick::Montage#shadow=shadow
|
1226
1270
|
Purpose: set shadow value
|
@@ -1235,6 +1279,7 @@ Montage_shadow_eq(VALUE self, VALUE shadow)
|
|
1235
1279
|
return self;
|
1236
1280
|
}
|
1237
1281
|
|
1282
|
+
|
1238
1283
|
/*
|
1239
1284
|
Method: Magick::Montage#stroke(color-name)
|
1240
1285
|
Purpose: set stroke value
|
@@ -1249,6 +1294,7 @@ Montage_stroke_eq(VALUE self, VALUE color)
|
|
1249
1294
|
return self;
|
1250
1295
|
}
|
1251
1296
|
|
1297
|
+
|
1252
1298
|
/*
|
1253
1299
|
Method: Montage#texture(texture-image)
|
1254
1300
|
Purpose: set texture value
|
@@ -1271,7 +1317,7 @@ Montage_texture_eq(VALUE self, VALUE texture)
|
|
1271
1317
|
montage->info->texture = NULL;
|
1272
1318
|
}
|
1273
1319
|
|
1274
|
-
texture =
|
1320
|
+
texture = rm_cur_image(texture);
|
1275
1321
|
texture_image = rm_check_destroyed(texture);
|
1276
1322
|
|
1277
1323
|
// Write a temp copy of the image & save its name.
|
@@ -1281,6 +1327,7 @@ Montage_texture_eq(VALUE self, VALUE texture)
|
|
1281
1327
|
return self;
|
1282
1328
|
}
|
1283
1329
|
|
1330
|
+
|
1284
1331
|
/*
|
1285
1332
|
Method: Magick::Montage#tile(tile)
|
1286
1333
|
Purpose: set tile value
|
@@ -1292,12 +1339,13 @@ Montage_tile_eq(VALUE self, VALUE tile_arg)
|
|
1292
1339
|
volatile VALUE tile;
|
1293
1340
|
|
1294
1341
|
Data_Get_Struct(self, Montage, montage);
|
1295
|
-
tile =
|
1342
|
+
tile = rm_to_s(tile_arg);
|
1296
1343
|
magick_clone_string(&montage->info->tile, StringValuePtr(tile));
|
1297
1344
|
|
1298
1345
|
return self;
|
1299
1346
|
}
|
1300
1347
|
|
1348
|
+
|
1301
1349
|
/*
|
1302
1350
|
Method: Magick::Montage#title(title)
|
1303
1351
|
Purpose: set title value
|
@@ -1373,7 +1421,8 @@ PolaroidOptions_initialize(VALUE self)
|
|
1373
1421
|
Purpose: allocate a PolaroidOptions instance
|
1374
1422
|
Notes: Internal use
|
1375
1423
|
*/
|
1376
|
-
VALUE
|
1424
|
+
VALUE
|
1425
|
+
rm_polaroid_new(void)
|
1377
1426
|
{
|
1378
1427
|
return PolaroidOptions_initialize(PolaroidOptions_alloc(Class_PolaroidOptions));
|
1379
1428
|
}
|
@@ -1383,7 +1432,8 @@ VALUE rm_polaroid_new(void)
|
|
1383
1432
|
Method: PolaroidOptions#shadow_color=
|
1384
1433
|
Purpose: Set the shadow color attribute
|
1385
1434
|
*/
|
1386
|
-
VALUE
|
1435
|
+
VALUE
|
1436
|
+
PolaroidOptions_shadow_color_eq(VALUE self, VALUE shadow)
|
1387
1437
|
{
|
1388
1438
|
Draw *draw;
|
1389
1439
|
|
@@ -1397,7 +1447,8 @@ VALUE PolaroidOptions_shadow_color_eq(VALUE self, VALUE shadow)
|
|
1397
1447
|
Method: PolaroidOptions#border_color=
|
1398
1448
|
Purpose: Set the border color attribute
|
1399
1449
|
*/
|
1400
|
-
VALUE
|
1450
|
+
VALUE
|
1451
|
+
PolaroidOptions_border_color_eq(VALUE self, VALUE border)
|
1401
1452
|
{
|
1402
1453
|
Draw *draw;
|
1403
1454
|
|
@@ -1407,7 +1458,8 @@ VALUE PolaroidOptions_border_color_eq(VALUE self, VALUE border)
|
|
1407
1458
|
}
|
1408
1459
|
|
1409
1460
|
|
1410
|
-
static VALUE
|
1461
|
+
static VALUE
|
1462
|
+
get_dummy_tm_img(VALUE klass)
|
1411
1463
|
{
|
1412
1464
|
#define DUMMY_IMG_CLASS_VAR "@@_dummy_img_"
|
1413
1465
|
volatile VALUE dummy_img = 0;
|
@@ -1489,7 +1541,7 @@ get_type_metrics(
|
|
1489
1541
|
Data_Get_Struct(get_dummy_tm_img(CLASS_OF(self)), Image, image);
|
1490
1542
|
break;
|
1491
1543
|
case 2:
|
1492
|
-
t =
|
1544
|
+
t = rm_cur_image(argv[0]);
|
1493
1545
|
image = rm_check_destroyed(t);
|
1494
1546
|
text = rm_str2cstr(argv[1], &text_l);
|
1495
1547
|
break; // okay
|