rmagick 5.4.4 → 6.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (68) hide show
  1. checksums.yaml +4 -4
  2. data/.devcontainer/ImageMagick6/devcontainer.json +1 -1
  3. data/.devcontainer/devcontainer.json +1 -1
  4. data/.github/workflows/ci.yml +41 -31
  5. data/.gitignore +1 -0
  6. data/.rubocop.yml +36 -9
  7. data/.rubocop_todo.yml +369 -187
  8. data/CHANGELOG.md +77 -0
  9. data/Gemfile +14 -0
  10. data/README.md +3 -3
  11. data/Rakefile +12 -1
  12. data/before_install_linux.sh +1 -11
  13. data/before_install_osx.sh +5 -7
  14. data/ext/RMagick/extconf.rb +58 -68
  15. data/ext/RMagick/rmagick.h +7 -12
  16. data/ext/RMagick/rmdraw.cpp +10 -20
  17. data/ext/RMagick/rmfill.cpp +4 -4
  18. data/ext/RMagick/rmilist.cpp +10 -2
  19. data/ext/RMagick/rmimage.cpp +342 -344
  20. data/ext/RMagick/rminfo.cpp +22 -21
  21. data/ext/RMagick/rmkinfo.cpp +5 -18
  22. data/ext/RMagick/rmmain.cpp +42 -91
  23. data/ext/RMagick/rmmontage.cpp +5 -5
  24. data/ext/RMagick/rmpixel.cpp +3 -3
  25. data/ext/RMagick/rmutil.cpp +58 -89
  26. data/lib/rmagick/version.rb +3 -3
  27. data/lib/rmagick.rb +1 -1
  28. data/lib/rmagick_internal.rb +111 -103
  29. data/lib/rvg/container.rb +3 -3
  30. data/lib/rvg/embellishable.rb +7 -3
  31. data/lib/rvg/misc.rb +15 -15
  32. data/lib/rvg/rvg.rb +6 -6
  33. data/lib/rvg/stretchable.rb +2 -2
  34. data/lib/rvg/stylable.rb +2 -2
  35. data/lib/rvg/transformable.rb +1 -1
  36. data/lib/rvg/units.rb +1 -0
  37. data/rmagick.gemspec +2 -15
  38. data/sig/rmagick/_draw_common_methods.rbs +64 -0
  39. data/sig/rmagick/_image_common_methods.rbs +387 -0
  40. data/sig/rmagick/draw.rbs +38 -0
  41. data/sig/rmagick/draw_attribute.rbs +28 -0
  42. data/sig/rmagick/enum.rbs +820 -0
  43. data/sig/rmagick/error.rbs +11 -0
  44. data/sig/rmagick/fill.rbs +21 -0
  45. data/sig/rmagick/geometry.rbs +14 -0
  46. data/sig/rmagick/image.rbs +196 -0
  47. data/sig/rmagick/image_list.rbs +183 -0
  48. data/sig/rmagick/iptc.rbs +101 -0
  49. data/sig/rmagick/kernel_info.rbs +12 -0
  50. data/sig/rmagick/optional_method_arguments.rbs +10 -0
  51. data/sig/rmagick/pixel.rbs +46 -0
  52. data/sig/rmagick/struct.rbs +90 -0
  53. data/sig/rmagick.rbs +43 -0
  54. data/sig/rvg/clippath.rbs +34 -0
  55. data/sig/rvg/container.rbs +78 -0
  56. data/sig/rvg/deep_equal.rbs +48 -0
  57. data/sig/rvg/describable.rbs +30 -0
  58. data/sig/rvg/embellishable.rbs +226 -0
  59. data/sig/rvg/misc.rbs +145 -0
  60. data/sig/rvg/paint.rbs +55 -0
  61. data/sig/rvg/pathdata.rbs +77 -0
  62. data/sig/rvg/rvg.rbs +125 -0
  63. data/sig/rvg/stretchable.rbs +56 -0
  64. data/sig/rvg/stylable.rbs +66 -0
  65. data/sig/rvg/text.rbs +118 -0
  66. data/sig/rvg/transformable.rbs +59 -0
  67. data/sig/rvg/units.rbs +33 -0
  68. metadata +38 -134
@@ -0,0 +1,387 @@
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 difference: (magick_image other) -> [Float, Float, Float]
226
+ def dispatch: (int x, int y, int columns, int rows, string map, ?bool float) -> Array[Integer]
227
+ def displace: (magick_image displacement_map, magick_real x_amp, ?magick_real y_amp, ?GravityType gravity, ?int x_offset, ?int y_offset) -> Image
228
+ def dissolve: (magick_image overlay, magick_percentage src_percent, ?magick_percentage dst_percent, ?GravityType gravity, ?int x_offset, ?int y_offset) -> Image
229
+ def distort: (DistortMethod method, Array[magick_real] points, ?bool bestfit) -> Image
230
+ def distortion_channel: (magick_image reconstructed_image, MetricType metric, *ChannelType channel) -> Float
231
+ def _dump: (untyped depth) -> String
232
+ def dup: () -> Image
233
+ def each_profile: () { (String name, String val) -> void } -> untyped
234
+ def edge: (?magick_real radius) -> Image
235
+ def emboss: (?magick_real radius, ?magick_real sigma) -> Image
236
+ def encipher: (string passphrase) -> Image
237
+ def enhance: () -> Image
238
+ def equalize: () -> Image
239
+ def equalize_channel: (*ChannelType channel) -> Image
240
+ def erase!: () -> self
241
+ def excerpt: (int x, int y, int width, int height) -> Image
242
+ def excerpt!: (int x, int y, int width, int height) -> self
243
+ def export_pixels: (?int x, ?int y, ?int cols, ?int rows, ?string map) -> Array[Integer]
244
+ def export_pixels_to_str: (?int x, ?int y, ?int cols, ?int rows, ?string map, ?StorageType storage_type) -> String
245
+ def extent: (int width, int height, ?int x, ?int y) -> Image
246
+ def find_similar_region: (magick_image target, int x, int y) -> [Integer, Integer]?
247
+ def flip: () -> Image
248
+ def flip!: () -> self
249
+ def flop: () -> Image
250
+ def flop!: () -> self
251
+ def frame: (?int width, ?int height, ?int x, ?int y, ?int inner_bevel, ?int outer_bevel, ?magick_color color) -> Image
252
+ def function_channel: (MagickFunction function, ?magick_real arg1, ?magick_real arg2, ?magick_real arg3, ?magick_real arg4, *ChannelType channel) -> Image
253
+ def fx: (string expression, *ChannelType channel) -> Image
254
+ def gamma_channel: (magick_real gamma, *ChannelType channel) -> Image
255
+ def gamma_correct: (magick_real red_gamma, ?magick_real green_gamma, ?magick_real blue_gamma) -> Image
256
+ def gaussian_blur: (?magick_real radius, ?magick_real sigma) -> Image
257
+ def gaussian_blur_channel: (?magick_real radius, ?magick_real sigma, *ChannelType channel) -> Image
258
+ def get_pixels: (int x_arg, int y_arg, int cols_arg, int rows_arg) -> Array[Pixel]
259
+ def gray?: () -> bool
260
+ alias grey? gray?
261
+ def histogram?: () -> bool
262
+ def implode: (?magick_real amount) -> Image
263
+ def import_pixels: (int x, int y, int columns, int rows, string map, string | Array[magick_real] pixels, ?StorageType storage_type) -> self
264
+ def inspect: () -> String
265
+ def level2: (?magick_real black_point, ?magick_real white_point, ?magick_real gamma) -> Image
266
+ def level_channel: (ChannelType channel, ?magick_real black_point, ?magick_real white_point, ?magick_real gamma) -> Image
267
+ def level_colors: (?magick_color black_color, ?magick_color white_color, ?bool invert, *ChannelType channel) -> Image
268
+ def levelize_channel: (magick_real black, ?magick_real white, ?magick_real gamma, *ChannelType channel) -> Image
269
+ def linear_stretch: (magick_percentage black_point, magick_percentage white_point, *ChannelType channel) -> Image
270
+ def liquid_rescale: (int columns, int rows, ?magick_real delta_x, ?magick_real rigidity) -> Image
271
+ def magnify: () -> Image
272
+ def magnify!: () -> self
273
+ def mask: (?magick_image image) -> Image?
274
+ def matte_flood_fill: (magick_color color, int x_obj, int y_obj, PaintMethod method, alpha: int) -> Image
275
+ def median_filter: (magick_real radius) -> Image
276
+ def minify: () -> Image
277
+ def minify!: () -> self
278
+ def modulate: (?magick_percentage brightness, ?magick_percentage saturation, ?magick_percentage hue) -> Image
279
+ def monochrome?: () -> bool
280
+ def motion_blur: (?magick_real radius, ?magick_real sigma, ?magick_real angle) -> Image
281
+ def negate: (?bool grayscale) -> Image
282
+ def negate_channel: (?bool grayscale, *ChannelType channel) -> Image
283
+ | (*ChannelType channel) -> Image
284
+ def normalize: () -> Image
285
+ def normalize_channel: (*ChannelType channel) -> Image
286
+ def oil_paint: (?magick_real radius) -> Image
287
+ def opaque: (magick_color target, magick_color fill) -> Image
288
+ def opaque_channel: (magick_color target, magick_color fill, bool invert, magick_real fuzz, *ChannelType channel) -> Image
289
+ | (magick_color target, magick_color fill, bool invert, *ChannelType channel) -> Image
290
+ | (magick_color target, magick_color fill, *ChannelType channel) -> Image
291
+ def opaque?: () -> bool
292
+ def ordered_dither: (?(string | 2 | 3 | 4) threshold_map) -> Image
293
+ def paint_transparent: (magick_color color, ?bool invert, ?magick_real fuzz, ?alpha: int) -> Image
294
+ def palette?: () -> bool
295
+ def pixel_color: (int x, int y, ?magick_color color) -> Pixel
296
+ def polaroid: (?magick_real angle) -> Image
297
+ | (?magick_real angle) { (Image::PolaroidOptions) -> void } -> Image
298
+ def posterize: (?int levels, ?bool dither) -> Image
299
+ def preview: (PreviewType preview) -> Image
300
+ def profile!: (string name, ?string profile) -> self
301
+ def quantum_operator: (QuantumExpressionOperator quantum_expression_op, magick_real rvalue, ?ChannelType channel) -> self
302
+ def radial_blur: (magick_real angle) -> Image
303
+ def radial_blur_channel: (magick_real angle, *ChannelType channel) -> Image
304
+ def raise: (?int width, ?int height, ?bool raised) -> Image
305
+ def random_threshold_channel: (Geometry | string geometry, *ChannelType channel) -> Image
306
+ def recolor: (Array[magick_real] color_matrix) -> Image
307
+ def reduce_noise: (int radius) -> Image
308
+ def resample: (?magick_real x_resolution, ?magick_real y_resolution, ?FilterType filter, ?magick_real blur) -> Image
309
+ def resample!: (?magick_real x_resolution, ?magick_real y_resolution, ?FilterType filter, ?magick_real blur) -> self
310
+ def resize: (magick_real scale) -> Image
311
+ | (int cols, int rows, ?FilterType filter, ?magick_real blur) -> Image
312
+ def resize!: (magick_real scale) -> self
313
+ | (int cols, int rows, ?FilterType filter, ?magick_real blur) -> self
314
+ def roll: (int x_offset, int y_offset) -> Image
315
+ def rotate: (magick_real degrees) -> Image
316
+ | (magick_real degrees, ?('<' | '>') qualifier) -> Image?
317
+ def rotate!: (magick_real degrees) -> self
318
+ | (magick_real degrees, ?('<' | '>') qualifier) -> self?
319
+ def sample: (magick_real scale) -> Image
320
+ | (int cols, int rows) -> Image
321
+ def sample!: (magick_real scale) -> self
322
+ | (int cols, int rows) -> self
323
+ def scale: (magick_real scale) -> Image
324
+ | (int cols, int rows) -> Image
325
+ def scale!: (magick_real scale) -> self
326
+ | (int cols, int rows) -> self
327
+ def segment: (?ColorspaceType colorspace, ?magick_real cluster_threshold, ?magick_real smoothing_threshold, ?bool verbose) -> Image
328
+ def selective_blur_channel: (magick_real radius, magick_real sigma, magick_percentage threshold, *ChannelType channel) -> Image
329
+ def separate: (*ChannelType channel) -> ImageList
330
+ def sepiatone: (magick_real threshold) -> Image
331
+ def set_channel_depth: (ChannelType channel, int depth) -> self
332
+ def shade: (?bool shading, ?magick_real azimuth, ?magick_real elevation) -> Image
333
+ def shadow: (?int x_offset, ?int y_offset, ?magick_real sigma, ?magick_percentage alpha) -> Image
334
+ def sharpen: (?magick_real radius, ?magick_real sigma) -> Image
335
+ def sharpen_channel: (magick_real radius, magick_real sigma, *ChannelType channel) -> Image
336
+ | (magick_real radius, *ChannelType channel) -> Image
337
+ | (*ChannelType channel) -> Image
338
+ def shave: (int width, int height) -> Image
339
+ def shave!: (int width, int height) -> self
340
+ def shear: (magick_real x_shear, magick_real y_shear) -> Image
341
+ def sigmoidal_contrast_channel: (magick_real contrast, magick_real midpoint, bool sharpen, *ChannelType channel) -> Image
342
+ | (magick_real contrast, magick_real midpoint, *ChannelType channel) -> Image
343
+ | (magick_real contrast, *ChannelType channel) -> Image
344
+ | (*ChannelType channel) -> Image
345
+ def signature: () -> String?
346
+ def sketch: (?magick_real radius, ?magick_real sigma, ?magick_real angle) -> Image
347
+ def solarize: (?magick_real threshold) -> Image
348
+ def sparse_color: (*untyped) -> Image # TODO: it can't describe expected argument type
349
+ def splice: (int x, int y, int width, int height, ?magick_color color) -> Image
350
+ def spread: (?magick_real radius) -> Image
351
+ def stegano: (magick_image watermark_image, int offset) -> Image
352
+ def stereo: (magick_image offset_image_arg) -> Image
353
+ def strip!: () -> self
354
+ def store_pixels: (int x, int y, int cols_arg, int rows_arg, Array[Pixel] new_pixels) -> self
355
+ def swirl: (magick_real degrees_obj) -> Image
356
+ def texture_flood_fill: (magick_color color_obj, magick_image texture_obj, int x_obj, int y_obj, PaintMethod method_obj) -> Image
357
+ def threshold: (magick_real threshold_obj) -> Image
358
+ def thumbnail: (magick_real scale) -> Image
359
+ | (int cols, int rows) -> Image
360
+ def thumbnail!: (magick_real scale) -> self
361
+ | (int cols, int rows) -> self
362
+ def tint: (magick_color tint, magick_real red_alpha, ?magick_real green_alpha, ?magick_real blue_alpha, ?magick_real alpha_alpha) -> Image
363
+ def to_color: (magick_color pixel_arg) -> String
364
+ def transparent: (magick_color color, ?alpha: int) -> Image
365
+ def transparent_chroma: (magick_color low, magick_color high, ?bool invert, ?alpha: int) -> Image
366
+ def transpose: () -> Image
367
+ def transpose!: () -> self
368
+ def transverse: () -> Image
369
+ def transverse!: () -> self
370
+ def trim: (?bool reset) -> Image
371
+ def trim!: (?bool reset) -> self
372
+ def undefine: (string artifact) -> self
373
+ def unique_colors: () -> Image
374
+ def unsharp_mask: (?magick_real radius, ?magick_real sigma, ?magick_real amount, ?magick_real threshold) -> Image
375
+ def unsharp_mask_channel: (magick_real radius, magick_real sigma, magick_real amount, magick_real threshold, *ChannelType channel) -> Image
376
+ | (magick_real radius, magick_real sigma, magick_real amount, *ChannelType channel) -> Image
377
+ | (magick_real radius, magick_real sigma, *ChannelType channel) -> Image
378
+ | (magick_real radius, *ChannelType channel) -> Image
379
+ | (*ChannelType channel) -> Image
380
+ def vignette: (?int horz_radius, ?int vert_radius, ?magick_real radius, ?magick_real sigma) -> Image
381
+ def watermark: (magick_image mark, ?magick_percentage brightness, ?magick_percentage saturation, ?int x_off, ?int y_off) -> Image
382
+ | (magick_image mark, magick_percentage brightness, magick_percentage saturation, GravityType gravity, ?int x_off, ?int y_off) -> Image
383
+ def wave: (?magick_real amplitude, ?magick_real wavelength) -> Image
384
+ def wet_floor: (?magick_real initial, ?magick_real rate) -> Image
385
+ def white_threshold: (magick_real red, ?magick_real green, ?magick_real blue, ?alpha: int) -> Image
386
+ end
387
+ 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