rmagick 5.4.3 → 5.5.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (59) hide show
  1. checksums.yaml +4 -4
  2. data/.github/workflows/ci.yml +15 -0
  3. data/.gitignore +1 -0
  4. data/.rubocop_todo.yml +16 -8
  5. data/CHANGELOG.md +50 -0
  6. data/Gemfile +20 -0
  7. data/Rakefile +11 -0
  8. data/before_install_osx.sh +1 -1
  9. data/ext/RMagick/extconf.rb +27 -11
  10. data/ext/RMagick/rmagick.h +3 -1
  11. data/ext/RMagick/rmdraw.cpp +10 -10
  12. data/ext/RMagick/rmfill.cpp +4 -4
  13. data/ext/RMagick/rmilist.cpp +10 -2
  14. data/ext/RMagick/rmimage.cpp +321 -294
  15. data/ext/RMagick/rminfo.cpp +22 -21
  16. data/ext/RMagick/rmkinfo.cpp +5 -18
  17. data/ext/RMagick/rmmain.cpp +30 -64
  18. data/ext/RMagick/rmmontage.cpp +5 -5
  19. data/ext/RMagick/rmpixel.cpp +9 -7
  20. data/ext/RMagick/rmutil.cpp +31 -71
  21. data/lib/rmagick/version.rb +1 -1
  22. data/lib/rmagick_internal.rb +67 -65
  23. data/lib/rvg/embellishable.rb +6 -2
  24. data/lib/rvg/misc.rb +7 -7
  25. data/lib/rvg/rvg.rb +2 -0
  26. data/lib/rvg/stretchable.rb +2 -2
  27. data/lib/rvg/transformable.rb +1 -1
  28. data/rmagick.gemspec +1 -13
  29. data/sig/rmagick/_draw_common_methods.rbs +64 -0
  30. data/sig/rmagick/_image_common_methods.rbs +389 -0
  31. data/sig/rmagick/draw.rbs +38 -0
  32. data/sig/rmagick/draw_attribute.rbs +28 -0
  33. data/sig/rmagick/enum.rbs +814 -0
  34. data/sig/rmagick/error.rbs +11 -0
  35. data/sig/rmagick/fill.rbs +21 -0
  36. data/sig/rmagick/geometry.rbs +14 -0
  37. data/sig/rmagick/image.rbs +194 -0
  38. data/sig/rmagick/image_list.rbs +181 -0
  39. data/sig/rmagick/iptc.rbs +101 -0
  40. data/sig/rmagick/kernel_info.rbs +12 -0
  41. data/sig/rmagick/optional_method_arguments.rbs +10 -0
  42. data/sig/rmagick/pixel.rbs +46 -0
  43. data/sig/rmagick/struct.rbs +90 -0
  44. data/sig/rmagick.rbs +43 -0
  45. data/sig/rvg/clippath.rbs +34 -0
  46. data/sig/rvg/container.rbs +78 -0
  47. data/sig/rvg/deep_equal.rbs +48 -0
  48. data/sig/rvg/describable.rbs +30 -0
  49. data/sig/rvg/embellishable.rbs +226 -0
  50. data/sig/rvg/misc.rbs +145 -0
  51. data/sig/rvg/paint.rbs +55 -0
  52. data/sig/rvg/pathdata.rbs +77 -0
  53. data/sig/rvg/rvg.rbs +125 -0
  54. data/sig/rvg/stretchable.rbs +56 -0
  55. data/sig/rvg/stylable.rbs +66 -0
  56. data/sig/rvg/text.rbs +118 -0
  57. data/sig/rvg/transformable.rbs +59 -0
  58. data/sig/rvg/units.rbs +33 -0
  59. metadata +32 -128
@@ -0,0 +1,389 @@
1
+ module Magick
2
+ interface _ImageCommonMethods
3
+ # Magick::Image / Magick::ImageList common methods
4
+
5
+ alias affinity remap
6
+ def annotate: (Draw draw, int width, int height, int x, int y, string text) -> self
7
+ | (Draw draw, int width, int height, int x, int y, string text) { (Draw) -> void } -> self
8
+ def color_point: (int x, int y, magick_color fill) -> Image
9
+ def color_floodfill: (int x, int y, magick_color fill) -> Image
10
+ def color_fill_to_border: (int x, int y, magick_color fill) -> Image
11
+ def color_reset!: (magick_color fill) -> Image
12
+ def cur_image: () -> self
13
+ def each_pixel: () { (Pixel, Integer, Integer) -> void } -> self
14
+ def get_exif_by_entry: (*(String | Symbol) entry) -> Array[[String, String]]
15
+ def get_exif_by_number: (*Integer tag) -> Hash[Integer, String]
16
+ def get_iptc_dataset: (interned ds) -> String?
17
+ def each_iptc_dataset: () { (String dataset, String data_field) -> void } -> nil
18
+ def level: (?magick_real black_point, ?magick_real white_point, ?magick_real gamma) -> Image
19
+ def matte_point: (int x, int y) -> Image
20
+ def matte_replace: (int x, int y) -> Image
21
+ def matte_floodfill: (int x, int y) -> Image
22
+ def matte_fill_to_border: (int x, int y) -> Image
23
+ def matte_reset!: -> Image
24
+ def resize_to_fill: (real ncols, ?real nrows, ?GravityType gravity) -> Image
25
+ def resize_to_fill!: (real ncols, ?real nrows, ?GravityType gravity) -> Image
26
+ alias crop_resized resize_to_fill
27
+ alias crop_resized! resize_to_fill!
28
+ def resize_to_fit: (magick_real cols, ?magick_real rows) -> Image
29
+ def resize_to_fit!: (magick_real cols, ?magick_real rows) -> Image
30
+ def texture_floodfill: (int x, int y, magick_image texture) -> Image
31
+ def texture_fill_to_border: (int x, int y, magick_image texture) -> Image
32
+ def view: (real x, real y, real width, real height) -> Image::View
33
+ | (real x, real y, real width, real height) { (Image::View) -> void } -> nil
34
+
35
+ def background_color: () -> String
36
+ def background_color=: (magick_color color) -> magick_color
37
+ def base_columns: () -> Integer
38
+ def base_filename: () -> String
39
+ def base_rows: () -> Integer
40
+ def bias: () -> Float
41
+ def bias=: (magick_percentage pct) -> magick_percentage
42
+ def black_point_compensation: () -> bool
43
+ def black_point_compensation=: (bool arg) -> bool
44
+ def border_color: () -> String
45
+ def border_color=: (magick_color color) -> magick_color
46
+ def bounding_box: () -> Rectangle
47
+ def chromaticity: () -> Chromaticity
48
+ def chromaticity=: (Chromaticity chroma) -> Chromaticity
49
+ def color_profile: () -> String?
50
+ def color_profile=: (string? profile) -> string?
51
+ def colors: () -> Integer
52
+ def colorspace: () -> ColorspaceType?
53
+ def colorspace=: (ColorspaceType colorspace) -> ColorspaceType
54
+ def columns: () -> Integer
55
+ def compose: () -> CompositeOperator?
56
+ def compose=: (CompositeOperator compose_arg) -> CompositeOperator
57
+ def compression: () -> CompressionType?
58
+ def compression=: (CompressionType compression) -> CompressionType
59
+ def delay: () -> Integer
60
+ def density: () -> String
61
+ def density=: (Geometry | string density_arg) -> (Geometry | string)
62
+ def depth: () -> Integer
63
+ def directory: () -> String?
64
+ def dispose: () -> DisposeType?
65
+ def dispose=: (DisposeType dispose) -> DisposeType
66
+ def endian: () -> EndianType?
67
+ def endian=: (EndianType endian_type) -> EndianType
68
+ def extract_info: () -> Rectangle
69
+ def extract_info=: (Rectangle rect) -> Rectangle
70
+ def filename: () -> String
71
+ def filesize: () -> Integer
72
+ def filter: () -> FilterType?
73
+ def filter=: (FilterType filter) -> FilterType
74
+ def format: () -> String?
75
+ def format=: (string magick) -> string
76
+ def fuzz: () -> Float
77
+ def fuzz=: (magick_percentage fuzz_arg) -> magick_percentage
78
+ def gamma: () -> Float
79
+ def gamma=: (magick_real val) -> magick_real
80
+ def geometry: () -> String?
81
+ def geometry=: ((Geometry | string)? geometry) -> (Geometry | string)?
82
+ def gravity: () -> GravityType?
83
+ def gravity=: (GravityType gravity) -> GravityType
84
+ def image_type: () -> ImageType?
85
+ def image_type=: (ImageType image_type) -> ImageType
86
+ def interlace: () -> InterlaceType?
87
+ def interlace=: (InterlaceType interlace) -> InterlaceType?
88
+ def iptc_profile: () -> String?
89
+ def iptc_profile=: (string? profile) -> string?
90
+ def matte_color: () -> String
91
+ def matte_color=: (magick_color color) -> magick_color
92
+ def mean_error_per_pixel: () -> Float
93
+ def mime_type: () -> String?
94
+ def normalized_mean_error: () -> Float
95
+ def normalized_maximum_error: () -> Float
96
+ def number_colors: () -> Integer
97
+ def offset: () -> Integer
98
+ def offset=: (int val) -> int
99
+ def orientation: () -> OrientationType?
100
+ def orientation=: (OrientationType orientation) -> OrientationType
101
+ def page: () -> Rectangle
102
+ def page=: (Rectangle rect) -> Rectangle
103
+ def pixel_interpolation_method: () -> PixelInterpolateMethod?
104
+ def pixel_interpolation_method=: (PixelInterpolateMethod method) -> PixelInterpolateMethod
105
+ def quality: () -> Integer
106
+ def quantum_depth: () -> Integer
107
+ def rendering_intent: () -> RenderingIntent?
108
+ def rendering_intent=: (RenderingIntent ri) -> RenderingIntent
109
+ def rows: () -> Integer
110
+ def start_loop: () -> bool
111
+ def start_loop=: (bool val) -> bool
112
+ def class_type: () -> ClassType?
113
+ def class_type=: (ClassType new_class_type) -> ClassType
114
+ def ticks_per_second: () -> Integer
115
+ alias total_colors number_colors
116
+ def total_ink_density: () -> Float
117
+ def transparent_color: () -> String
118
+ def transparent_color=: (magick_color color) -> magick_color
119
+ def units: () -> ResolutionType
120
+ def units=: (ResolutionType restype) -> ResolutionType
121
+ def virtual_pixel_method: () -> VirtualPixelMethod?
122
+ def virtual_pixel_method=: (VirtualPixelMethod method) -> VirtualPixelMethod
123
+ def x_resolution: () -> Float
124
+ def x_resolution=: (magick_real val) -> magick_real
125
+ def y_resolution: () -> Float
126
+ def y_resolution=: (magick_real val) -> magick_real
127
+
128
+ def adaptive_blur: (?magick_real radius, ?magick_real sigma) -> Image
129
+ def adaptive_blur_channel: (magick_real radius, magick_real sigma, *ChannelType channels) -> Image
130
+ | (magick_real radius, *ChannelType channels) -> Image
131
+ | (*ChannelType channels) -> Image
132
+ def adaptive_resize: (magick_real scale_val) -> Image
133
+ | (int cols, int rows) -> Image
134
+ def adaptive_sharpen: (?magick_real radius, ?magick_real sigma) -> Image
135
+ def adaptive_sharpen_channel: (magick_real radius, magick_real sigma, *ChannelType channels) -> Image
136
+ | (magick_real radius, *ChannelType channels) -> Image
137
+ | (*ChannelType channels) -> Image
138
+ def adaptive_threshold: (?int width, ?int height, ?magick_real bias) -> Image
139
+ def add_compose_mask: (magick_image mask) -> self
140
+ def add_noise: (NoiseType noise) -> Image
141
+ def add_noise_channel: (NoiseType noise, *ChannelType channels) -> Image
142
+ def add_profile: (string name) -> self
143
+ def affine_transform: (AffineMatrix affine) -> Image
144
+ def remap: (magick_image remap_image, ?DitherMethod dither_method) -> self
145
+ def alpha: () -> bool
146
+ | (AlphaChannelOption value) -> AlphaChannelOption
147
+ def alpha?: () -> bool
148
+ def auto_gamma_channel: (*ChannelType channel) -> Image
149
+ def auto_level_channel: (*ChannelType channel) -> Image
150
+ def auto_orient: () -> Image
151
+ def auto_orient!: () -> self
152
+ def properties: () -> Hash[String, String]
153
+ | () { ([String, String]) -> void } -> self
154
+ def bilevel_channel: (magick_real threshold, *ChannelType channel) -> Image
155
+ def black_threshold: (magick_real red, ?magick_real green, ?magick_real blue, ?int alpha) -> Image
156
+ def blend: (magick_image overlay, magick_percentage src_percent, ?magick_percentage dst_percent, ?GravityType gravity, ?int x_offset, ?int y_offset) -> Image
157
+ | (magick_image overlay, magick_percentage src_percent, magick_percentage dst_percent, ?int x_offset, ?int y_offset) -> Image
158
+ def blue_shift: (?magick_real factor) -> Image
159
+ def blur_image: (?magick_real radius, ?magick_real sigma) -> Image
160
+ def blur_channel: (magick_real radius, magick_real sigma, *ChannelType channel) -> Image
161
+ | (magick_real radius, *ChannelType channel) -> Image
162
+ | (*ChannelType channel) -> Image
163
+ def border: (int width, int height, magick_color color) -> Image
164
+ def border!: (int width, int height, magick_color color) -> self
165
+ def change_geometry: (Geometry | string geom_arg) { ([Integer, Integer, Image]) -> void } -> untyped
166
+ alias change_geometry! change_geometry
167
+ def changed?: () -> bool
168
+ def channel: (ChannelType channel) -> Image
169
+ def check_destroyed: () -> nil
170
+ def compare_channel: (magick_image image, MetricType metric, *ChannelType channel) -> [Image, Float]
171
+ | (magick_image image, MetricType metric, *ChannelType channel) { (OptionalMethodArguments) -> void } -> [Image, Float]
172
+ alias channel_compare compare_channel
173
+ def channel_depth: (*ChannelType channel) -> Integer
174
+ def channel_extrema: (*ChannelType channel) -> [Integer, Integer]
175
+ def channel_mean: (*ChannelType channel) -> [Float, Float]
176
+ def channel_entropy: (*ChannelType channel) -> [Float]
177
+ def charcoal: (?magick_real radius, ?magick_real sigma) -> Image
178
+ def chop: (int x, int y, int width, int height) -> Image
179
+ def clut_channel: (magick_image clut_image, *ChannelType channel) -> self
180
+ def clone: () -> Image
181
+ def color_flood_fill: (magick_color target_color, magick_color fill_color, int xv, int yv, PaintMethod method) -> Image
182
+ def color_histogram: () -> Hash[Pixel, Integer]
183
+ def colorize: (magick_real red, magick_real green, magick_real blue, magick_color target) -> Image
184
+ | (magick_real red, magick_real green, magick_real blue, magick_real matte, magick_color target) -> Image
185
+ def colormap: (int index, ?magick_color new_color) -> String
186
+ def composite: (magick_image image, GravityType gravity, int x_off, int y_off, CompositeOperator composite_op) -> Image
187
+ | (magick_image image, int x_off, int y_off, CompositeOperator composite_op) -> Image
188
+ | (magick_image image, GravityType gravity, CompositeOperator composite_op) -> Image
189
+ def composite!: (magick_image image, GravityType gravity, int x_off, int y_off, CompositeOperator composite_op) -> self
190
+ | (magick_image image, int x_off, int y_off, CompositeOperator composite_op) -> self
191
+ | (magick_image image, GravityType gravity, CompositeOperator composite_op) -> self
192
+ def composite_affine: (magick_image source, AffineMatrix affine_matrix) -> Image
193
+ def composite_channel: (magick_image image, GravityType gravity, int x_off, int y_off, CompositeOperator composite_op, *ChannelType channel) -> Image
194
+ | (magick_image image, int x_off, int y_off, CompositeOperator composite_op, *ChannelType channel) -> Image
195
+ | (magick_image image, GravityType gravity, CompositeOperator composite_op, *ChannelType channel) -> Image
196
+ def composite_channel!: (magick_image image, GravityType gravity, int x_off, int y_off, CompositeOperator composite_op, *ChannelType channel) -> self
197
+ | (magick_image image, int x_off, int y_off, CompositeOperator composite_op, *ChannelType channel) -> self
198
+ | (magick_image image, GravityType gravity, CompositeOperator composite_op, *ChannelType channel) -> self
199
+ def composite_mathematics: (magick_image image, magick_real a, magick_real b, magick_real c, magick_real d, GravityType gravity) -> Image
200
+ | (magick_image image, magick_real a, magick_real b, magick_real c, magick_real d, int x_off, int y_off) -> Image
201
+ | (magick_image image, magick_real a, magick_real b, magick_real c, magick_real d, GravityType gravity, int x_off, int y_off) -> Image
202
+ def composite_tiled: (magick_image src, ?CompositeOperator composite_op, *ChannelType channel) -> Image
203
+ def composite_tiled!: (magick_image src, ?CompositeOperator composite_op, *ChannelType channel) -> self
204
+ def compress_colormap!: () -> Image
205
+ def contrast: (?bool sharpen) -> Image
206
+ def contrast_stretch_channel: (magick_percentage black_point, magick_percentage white_point, *ChannelType channel) -> Image
207
+ def convolve: (int order_arg, Array[magick_real] kernel_arg) -> Image
208
+ def convolve_channel: (int order_arg, Array[magick_real] kernel_arg, *ChannelType channel) -> Image
209
+ def morphology: (MorphologyMethod method_v, int iterations, KernelInfo kernel_v) -> Image
210
+ def morphology_channel: (ChannelType channel_v, MorphologyMethod method_v, int iterations, KernelInfo kernel_v) -> Image
211
+ def copy: () -> Image
212
+ def crop: (GravityType gravity, int x, int y, int width, int height, ?bool reset) -> Image
213
+ | (GravityType gravity, int width, int height, ?bool reset) -> Image
214
+ | (int x, int y, int width, int height, ?bool reset) -> Image
215
+ def crop!: (GravityType gravity, int x, int y, int width, int height, ?bool reset) -> Image
216
+ | (GravityType gravity, int width, int height, ?bool reset) -> Image
217
+ | (int x, int y, int width, int height, ?bool reset) -> Image
218
+ def cycle_colormap: (int amount) -> Image
219
+ def decipher: (string passphrase) -> Image
220
+ def define: (string artifact, string? value) -> string?
221
+ def deskew: (?magick_percentage threshold, ?int auto_crop_width) -> Image
222
+ def delete_compose_mask: () -> self
223
+ def delete_profile: (string name) -> self
224
+ def despeckle: () -> Image
225
+ def destroy!: () -> self
226
+ def destroyed?: () -> bool
227
+ def difference: (magick_image other) -> [Float, Float, Float]
228
+ def dispatch: (int x, int y, int columns, int rows, string map, ?bool float) -> Array[Integer]
229
+ def displace: (magick_image displacement_map, magick_real x_amp, ?magick_real y_amp, ?GravityType gravity, ?int x_offset, ?int y_offset) -> Image
230
+ def dissolve: (magick_image overlay, magick_percentage src_percent, ?magick_percentage dst_percent, ?GravityType gravity, ?int x_offset, ?int y_offset) -> Image
231
+ def distort: (DistortMethod method, Array[magick_real] points, ?bool bestfit) -> Image
232
+ def distortion_channel: (magick_image reconstructed_image, MetricType metric, *ChannelType channel) -> Float
233
+ def _dump: (untyped depth) -> String
234
+ def dup: () -> Image
235
+ def each_profile: () { (String name, String val) -> void } -> untyped
236
+ def edge: (?magick_real radius) -> Image
237
+ def emboss: (?magick_real radius, ?magick_real sigma) -> Image
238
+ def encipher: (string passphrase) -> Image
239
+ def enhance: () -> Image
240
+ def equalize: () -> Image
241
+ def equalize_channel: (*ChannelType channel) -> Image
242
+ def erase!: () -> self
243
+ def excerpt: (int x, int y, int width, int height) -> Image
244
+ def excerpt!: (int x, int y, int width, int height) -> self
245
+ def export_pixels: (?int x, ?int y, ?int cols, ?int rows, ?string map) -> Array[Integer]
246
+ def export_pixels_to_str: (?int x, ?int y, ?int cols, ?int rows, ?string map, ?StorageType storage_type) -> String
247
+ def extent: (int width, int height, ?int x, ?int y) -> Image
248
+ def find_similar_region: (magick_image target, int x, int y) -> [Integer, Integer]?
249
+ def flip: () -> Image
250
+ def flip!: () -> self
251
+ def flop: () -> Image
252
+ def flop!: () -> self
253
+ def frame: (?int width, ?int height, ?int x, ?int y, ?int inner_bevel, ?int outer_bevel, ?magick_color color) -> Image
254
+ def function_channel: (MagickFunction function, ?magick_real arg1, ?magick_real arg2, ?magick_real arg3, ?magick_real arg4, *ChannelType channel) -> Image
255
+ def fx: (string expression, *ChannelType channel) -> Image
256
+ def gamma_channel: (magick_real gamma, *ChannelType channel) -> Image
257
+ def gamma_correct: (magick_real red_gamma, ?magick_real green_gamma, ?magick_real blue_gamma) -> Image
258
+ def gaussian_blur: (?magick_real radius, ?magick_real sigma) -> Image
259
+ def gaussian_blur_channel: (?magick_real radius, ?magick_real sigma, *ChannelType channel) -> Image
260
+ def get_pixels: (int x_arg, int y_arg, int cols_arg, int rows_arg) -> Array[Pixel]
261
+ def gray?: () -> bool
262
+ alias grey? gray?
263
+ def histogram?: () -> bool
264
+ def implode: (?magick_real amount) -> Image
265
+ def import_pixels: (int x, int y, int columns, int rows, string map, string | Array[magick_real] pixels, ?StorageType storage_type) -> self
266
+ def inspect: () -> String
267
+ def level2: (?magick_real black_point, ?magick_real white_point, ?magick_real gamma) -> Image
268
+ def level_channel: (ChannelType channel, ?magick_real black_point, ?magick_real white_point, ?magick_real gamma) -> Image
269
+ def level_colors: (?magick_color black_color, ?magick_color white_color, ?bool invert, *ChannelType channel) -> Image
270
+ def levelize_channel: (magick_real black, ?magick_real white, ?magick_real gamma, *ChannelType channel) -> Image
271
+ def linear_stretch: (magick_percentage black_point, magick_percentage white_point, *ChannelType channel) -> Image
272
+ def liquid_rescale: (int columns, int rows, ?magick_real delta_x, ?magick_real rigidity) -> Image
273
+ def magnify: () -> Image
274
+ def magnify!: () -> self
275
+ def mask: (?magick_image image) -> Image?
276
+ def matte_flood_fill: (magick_color color, int x_obj, int y_obj, PaintMethod method, alpha: int) -> Image
277
+ def median_filter: (magick_real radius) -> Image
278
+ def minify: () -> Image
279
+ def minify!: () -> self
280
+ def modulate: (?magick_percentage brightness, ?magick_percentage saturation, ?magick_percentage hue) -> Image
281
+ def monochrome?: () -> bool
282
+ def motion_blur: (?magick_real radius, ?magick_real sigma, ?magick_real angle) -> Image
283
+ def negate: (?bool grayscale) -> Image
284
+ def negate_channel: (?bool grayscale, *ChannelType channel) -> Image
285
+ | (*ChannelType channel) -> Image
286
+ def normalize: () -> Image
287
+ def normalize_channel: (*ChannelType channel) -> Image
288
+ def oil_paint: (?magick_real radius) -> Image
289
+ def opaque: (magick_color target, magick_color fill) -> Image
290
+ def opaque_channel: (magick_color target, magick_color fill, bool invert, magick_real fuzz, *ChannelType channel) -> Image
291
+ | (magick_color target, magick_color fill, bool invert, *ChannelType channel) -> Image
292
+ | (magick_color target, magick_color fill, *ChannelType channel) -> Image
293
+ def opaque?: () -> bool
294
+ def ordered_dither: (?(string | 2 | 3 | 4) threshold_map) -> Image
295
+ def paint_transparent: (magick_color color, ?bool invert, ?magick_real fuzz, ?alpha: int) -> Image
296
+ def palette?: () -> bool
297
+ def pixel_color: (int x, int y, ?magick_color color) -> Pixel
298
+ def polaroid: (?magick_real angle) -> Image
299
+ | (?magick_real angle) { (Image::PolaroidOptions) -> void } -> Image
300
+ def posterize: (?int levels, ?bool dither) -> Image
301
+ def preview: (PreviewType preview) -> Image
302
+ def profile!: (string name, ?string profile) -> self
303
+ def quantum_operator: (QuantumExpressionOperator quantum_expression_op, magick_real rvalue, ?ChannelType channel) -> self
304
+ def radial_blur: (magick_real angle) -> Image
305
+ def radial_blur_channel: (magick_real angle, *ChannelType channel) -> Image
306
+ def raise: (?int width, ?int height, ?bool raised) -> Image
307
+ def random_threshold_channel: (Geometry | string geometry, *ChannelType channel) -> Image
308
+ def recolor: (Array[magick_real] color_matrix) -> Image
309
+ def reduce_noise: (int radius) -> Image
310
+ def resample: (?magick_real x_resolution, ?magick_real y_resolution, ?FilterType filter, ?magick_real blur) -> Image
311
+ def resample!: (?magick_real x_resolution, ?magick_real y_resolution, ?FilterType filter, ?magick_real blur) -> self
312
+ def resize: (magick_real scale) -> Image
313
+ | (int cols, int rows, ?FilterType filter, ?magick_real blur) -> Image
314
+ def resize!: (magick_real scale) -> self
315
+ | (int cols, int rows, ?FilterType filter, ?magick_real blur) -> self
316
+ def roll: (int x_offset, int y_offset) -> Image
317
+ def rotate: (magick_real degrees) -> Image
318
+ | (magick_real degrees, ?('<' | '>') qualifier) -> Image?
319
+ def rotate!: (magick_real degrees) -> self
320
+ | (magick_real degrees, ?('<' | '>') qualifier) -> self?
321
+ def sample: (magick_real scale) -> Image
322
+ | (int cols, int rows) -> Image
323
+ def sample!: (magick_real scale) -> self
324
+ | (int cols, int rows) -> self
325
+ def scale: (magick_real scale) -> Image
326
+ | (int cols, int rows) -> Image
327
+ def scale!: (magick_real scale) -> self
328
+ | (int cols, int rows) -> self
329
+ def segment: (?ColorspaceType colorspace, ?magick_real cluster_threshold, ?magick_real smoothing_threshold, ?bool verbose) -> Image
330
+ def selective_blur_channel: (magick_real radius, magick_real sigma, magick_percentage threshold, *ChannelType channel) -> Image
331
+ def separate: (*ChannelType channel) -> ImageList
332
+ def sepiatone: (magick_real threshold) -> Image
333
+ def set_channel_depth: (ChannelType channel, int depth) -> self
334
+ def shade: (?bool shading, ?magick_real azimuth, ?magick_real elevation) -> Image
335
+ def shadow: (?int x_offset, ?int y_offset, ?magick_real sigma, ?magick_percentage alpha) -> Image
336
+ def sharpen: (?magick_real radius, ?magick_real sigma) -> Image
337
+ def sharpen_channel: (magick_real radius, magick_real sigma, *ChannelType channel) -> Image
338
+ | (magick_real radius, *ChannelType channel) -> Image
339
+ | (*ChannelType channel) -> Image
340
+ def shave: (int width, int height) -> Image
341
+ def shave!: (int width, int height) -> self
342
+ def shear: (magick_real x_shear, magick_real y_shear) -> Image
343
+ def sigmoidal_contrast_channel: (magick_real contrast, magick_real midpoint, bool sharpen, *ChannelType channel) -> Image
344
+ | (magick_real contrast, magick_real midpoint, *ChannelType channel) -> Image
345
+ | (magick_real contrast, *ChannelType channel) -> Image
346
+ | (*ChannelType channel) -> Image
347
+ def signature: () -> String?
348
+ def sketch: (?magick_real radius, ?magick_real sigma, ?magick_real angle) -> Image
349
+ def solarize: (?magick_real threshold) -> Image
350
+ def sparse_color: (*untyped) -> Image # TODO: it can't describe expected argument type
351
+ def splice: (int x, int y, int width, int height, ?magick_color color) -> Image
352
+ def spread: (?magick_real radius) -> Image
353
+ def stegano: (magick_image watermark_image, int offset) -> Image
354
+ def stereo: (magick_image offset_image_arg) -> Image
355
+ def strip!: () -> self
356
+ def store_pixels: (int x, int y, int cols_arg, int rows_arg, Array[Pixel] new_pixels) -> self
357
+ def swirl: (magick_real degrees_obj) -> Image
358
+ def texture_flood_fill: (magick_color color_obj, magick_image texture_obj, int x_obj, int y_obj, PaintMethod method_obj) -> Image
359
+ def threshold: (magick_real threshold_obj) -> Image
360
+ def thumbnail: (magick_real scale) -> Image
361
+ | (int cols, int rows) -> Image
362
+ def thumbnail!: (magick_real scale) -> self
363
+ | (int cols, int rows) -> self
364
+ def tint: (magick_color tint, magick_real red_alpha, ?magick_real green_alpha, ?magick_real blue_alpha, ?magick_real alpha_alpha) -> Image
365
+ def to_color: (magick_color pixel_arg) -> String
366
+ def transparent: (magick_color color, ?alpha: int) -> Image
367
+ def transparent_chroma: (magick_color low, magick_color high, ?bool invert, ?alpha: int) -> Image
368
+ def transpose: () -> Image
369
+ def transpose!: () -> self
370
+ def transverse: () -> Image
371
+ def transverse!: () -> self
372
+ def trim: (?bool reset) -> Image
373
+ def trim!: (?bool reset) -> self
374
+ def undefine: (string artifact) -> self
375
+ def unique_colors: () -> Image
376
+ def unsharp_mask: (?magick_real radius, ?magick_real sigma, ?magick_real amount, ?magick_real threshold) -> Image
377
+ def unsharp_mask_channel: (magick_real radius, magick_real sigma, magick_real amount, magick_real threshold, *ChannelType channel) -> Image
378
+ | (magick_real radius, magick_real sigma, magick_real amount, *ChannelType channel) -> Image
379
+ | (magick_real radius, magick_real sigma, *ChannelType channel) -> Image
380
+ | (magick_real radius, *ChannelType channel) -> Image
381
+ | (*ChannelType channel) -> Image
382
+ def vignette: (?int horz_radius, ?int vert_radius, ?magick_real radius, ?magick_real sigma) -> Image
383
+ def watermark: (magick_image mark, ?magick_percentage brightness, ?magick_percentage saturation, ?int x_off, ?int y_off) -> Image
384
+ | (magick_image mark, magick_percentage brightness, magick_percentage saturation, GravityType gravity, ?int x_off, ?int y_off) -> Image
385
+ def wave: (?magick_real amplitude, ?magick_real wavelength) -> Image
386
+ def wet_floor: (?magick_real initial, ?magick_real rate) -> Image
387
+ def white_threshold: (magick_real red, ?magick_real green, ?magick_real blue, ?alpha: int) -> Image
388
+ end
389
+ end
@@ -0,0 +1,38 @@
1
+ module Magick
2
+ class Draw
3
+ include DrawAttribute
4
+ include _DrawCommonMethods
5
+
6
+ ALIGN_TYPE_NAMES: Hash[Integer, 'left' | 'right' | 'center']
7
+ ANCHOR_TYPE_NAMES: Hash[Integer, 'start' | 'middle' | 'end']
8
+ DECORATION_TYPE_NAMES: Hash[Integer, 'none' | 'underline' | 'overline' | 'line-through']
9
+ FONT_WEIGHT_NAMES: Hash[Integer, 'all' | 'normal' | 'bold' | 'bolder' | 'lighter']
10
+ GRAVITY_NAMES: Hash[Integer, 'northwest' | 'north' | 'northeast' | 'west' | 'center' | 'east' | 'southwest' | 'south' | 'southeast']
11
+ PAINT_METHOD_NAMES: Hash[Integer, 'point' | 'replace' | 'floodfill' | 'filltoborder' | 'reset']
12
+ STRETCH_TYPE_NAMES: Hash[Integer, 'normal' | 'ultra-condensed' | 'extra-condensed' | 'condensed' | 'semi-condensed' | 'semi-expanded' | 'expanded' | 'extra-expanded' | 'ultra-expanded' | 'all']
13
+ STYLE_TYPE_NAMES: Hash[Integer, 'normal' | 'italic' | 'oblique' | 'all']
14
+
15
+ private
16
+
17
+ def enquote: (interned str) -> untyped
18
+ def to_opacity: (magick_percentage opacity) -> untyped
19
+ def to_string: (interned obj) -> untyped
20
+
21
+ public
22
+
23
+ def pop: (*interned what) -> self
24
+ def push: (*interned what) -> self
25
+ def text: (magick_real x, magick_real y, String text) -> self
26
+ def font: (interned name) -> self
27
+ def font_family: (interned name) -> self
28
+ def font_stretch: (StretchType stretch) -> self
29
+ def font_style: (StyleType style) -> self
30
+ def font_weight: (WeightType | int weight) -> self
31
+ alias font_size pointsize
32
+ def rotate: (magick_real angle) -> self
33
+ def scale: (magick_real x, magick_real y) -> self
34
+ def stroke_width: (magick_real pixels) -> self
35
+ def text_anchor: (AnchorType anchor) -> self
36
+ def translate: (magick_real x, magick_real y) -> self
37
+ end
38
+ end
@@ -0,0 +1,28 @@
1
+ module Magick
2
+ module DrawAttribute
3
+ attr_writer affine: AffineMatrix
4
+ attr_writer align: AlignType
5
+ attr_writer decorate: DecorationType
6
+ attr_writer density: string
7
+ attr_writer encoding: string
8
+ attr_writer fill: magick_color
9
+ attr_writer fill_pattern: magick_image?
10
+ attr_writer font: string
11
+ attr_writer font_family: string
12
+ attr_writer font_stretch: StretchType
13
+ attr_writer font_style: StyleType
14
+ attr_writer font_weight: WeightType | Integer
15
+ attr_writer gravity: GravityType
16
+ attr_writer interline_spacing: magick_real
17
+ attr_writer interword_spacing: magick_real
18
+ attr_writer kerning: magick_real
19
+ attr_writer pointsize: magick_real
20
+ attr_writer rotation: magick_real
21
+ attr_writer stroke: magick_color
22
+ attr_writer stroke_pattern: magick_image?
23
+ attr_writer stroke_width: magick_real
24
+ attr_writer text_antialias: bool
25
+ attr_writer tile: magick_image?
26
+ attr_writer undercolor: magick_color
27
+ end
28
+ end