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,11 @@
1
+ module Magick
2
+ class ImageMagickError < StandardError
3
+ attr_reader magick_location: String
4
+ end
5
+
6
+ class FatalImageMagickError < StandardError
7
+ end
8
+
9
+ class DestroyedImageError < StandardError
10
+ end
11
+ end
@@ -0,0 +1,21 @@
1
+ module Magick
2
+ class GradientFill
3
+ include _Fill
4
+ def initialize: (magick_real x1, magick_real y1, magick_real x2, magick_real y2, magick_color start_color, magick_color stop_color) -> void
5
+ end
6
+
7
+ class HatchFill
8
+ include _Fill
9
+ def initialize: (magick_color bgcolor, ?magick_color hatchcolor, ?Numeric dist) -> void
10
+ end
11
+
12
+ class SolidFill
13
+ include _Fill
14
+ def initialize: (magick_color bgcolor) -> void
15
+ end
16
+
17
+ class TextureFill
18
+ include _Fill
19
+ def initialize: (magick_image texture_arg) -> void
20
+ end
21
+ end
@@ -0,0 +1,14 @@
1
+ module Magick
2
+ class Geometry
3
+ attr_accessor width: Integer | Float
4
+ attr_accessor height: Integer | Float
5
+ attr_accessor x: Integer
6
+ attr_accessor y: Integer
7
+ attr_accessor flag: GeometryValue?
8
+
9
+ def initialize: (?magick_real? width, ?magick_real? height, ?real? x, ?real? y, ?GeometryValue? flag) -> void
10
+ def self.from_s: (String str) -> Geometry
11
+ def to_s: -> String
12
+ end
13
+ end
14
+
@@ -0,0 +1,196 @@
1
+ module Magick
2
+ class Image
3
+ include Comparable
4
+
5
+ include _ImageCommonMethods
6
+
7
+ # When it reads an image file, it returns one or more Image objects.
8
+ # However, it cannot properly define it in RBS.
9
+ # If define as Array[Image] implies the possibility of returning nil.
10
+ # it would require consideration of nil in subsequent method calls.
11
+ # So, it defined in Tuple type to avoid allowing unnecessary guard statements to be written.
12
+ def self.constitute: (int witdth_arg, int height_arg, string map_arg, Array[Pixel] pixels_arg) -> Image
13
+ def self._load: (string str) -> Image
14
+ def self.capture: (bool silent, bool frame, bool descend, bool screen, bool borders) -> Image
15
+ | (bool silent, bool frame, bool descend, bool screen, bool borders) { (Image::Info) -> void } -> Image
16
+ def self.ping: (File | string file) -> [Image]
17
+ | (File | string file) { (Image::Info) -> void } -> [Image]
18
+ def self.read: (File | string file) -> [Image]
19
+ | (File | string file) { (Image::Info) -> void } -> [Image]
20
+ def self.read_inline: (string content) -> [Image]
21
+ | (string content) { (Image::Info) -> void } -> [Image]
22
+ def self.from_blob: (string blob) -> [Image]
23
+ | (string blob) { (Image::Info) -> void } -> [Image]
24
+
25
+ def initialize: (int cols, int rows, ?magick_fill fill) -> void
26
+ | (int cols, int rows, ?magick_fill fill) { (Image::Info) -> void } -> void
27
+ def <=>: (untyped object) -> (Integer | nil)
28
+ def []: (interned key_arg) -> String?
29
+ def []=: (interned key_arg, String attr_arg) -> self
30
+ def delay=: (int val) -> int
31
+ def display: () -> self
32
+ | () { (Image::Info) -> void} -> self
33
+ def marshal_dump: () -> [String, String]
34
+ def marshal_load: ([string, string] ary) -> self
35
+ def montage: () -> String?
36
+ def quantize: (?int number_colors, ?ColorspaceType colorspace, ?bool dither, ?int tree_depth, ?bool measure_error) -> Image
37
+ def scene: () -> Integer
38
+ def ticks_per_second=: (int tps) -> int
39
+ def to_blob: () -> String?
40
+ | () { (Image::Info) -> void} -> String?
41
+ def write: (File | string file) -> self
42
+ | (File | string file) { (Image::Info) -> void} -> self
43
+ def destroy!: () -> self
44
+ def destroyed?: () -> bool
45
+
46
+ class View
47
+ attr_reader x: real
48
+ attr_reader y: real
49
+ attr_reader width: real
50
+ attr_reader height: real
51
+ attr_accessor dirty: bool
52
+ def initialize: (Image img, real x, real y, real width, real height) -> void
53
+ def []: (Integer index) -> Rows
54
+ | (Range[Numeric] range) -> Rows
55
+ | (Integer start, Integer length) -> Rows
56
+ def sync: (?bool force) -> bool
57
+ def update: (Rows rows) -> nil
58
+
59
+ class Pixels < Array[untyped]
60
+ # include Observable
61
+ def red: () -> Array[Integer]
62
+ attr_writer red: Integer
63
+ def green: () -> Array[Integer]
64
+ attr_writer green: Integer
65
+ def blue: () -> Array[Integer]
66
+ attr_writer blue: Integer
67
+ def opacity: () -> Array[Integer]
68
+ attr_writer opacity: Integer
69
+ end
70
+
71
+ class Rows
72
+ # include Observable
73
+ def initialize: (View view, real width, real height, Rows rows) -> void
74
+ def []: () -> View::Pixels
75
+ | (Integer index) -> Pixel
76
+ | (Range[Numeric] range) -> View::Pixels
77
+ | (Integer start, Integer length) -> View::Pixels
78
+ def []=: (magick_color value) -> void
79
+ | (Integer index, magick_color value) -> void
80
+ | (Range[Numeric] range, magick_color value) -> void
81
+ | (Integer start, Integer length, magick_color value) -> void
82
+ def update: (Pixels | Pixel pixel) -> nil
83
+
84
+ private
85
+
86
+ def cols: (*untyped args) -> void
87
+ def each: () -> void
88
+ end
89
+ end
90
+
91
+ class Info
92
+ def initialize: () -> void
93
+ def channel: (*ChannelType channel) -> self
94
+ def define: (string format, string key, ?string value) -> self?
95
+ def []=: (string format, string key, string value) -> self?
96
+ | (string key, string value) -> self?
97
+ def []: (string format, string key) -> String?
98
+ | (string key) -> String?
99
+ def undefine: (string format, string key) -> self
100
+
101
+ attr_accessor antialias: bool
102
+ def attenuate: () -> Float
103
+ attr_writer attenuate: magick_real
104
+ attr_accessor authenticate: string?
105
+ def background_color: () -> String
106
+ attr_writer background_color: magick_color
107
+ def border_color: () -> String
108
+ attr_writer border_color: magick_color
109
+ def caption: () -> String
110
+ attr_writer caption: string?
111
+ attr_accessor colorspace: ColorspaceType
112
+ def comment: () -> String
113
+ attr_writer comment: string?
114
+ attr_accessor compression: CompressionType
115
+ def delay: () -> Integer?
116
+ attr_writer delay: int?
117
+ def density: () -> String?
118
+ attr_writer density: (Geometry | string)?
119
+ def depth: () -> Integer
120
+ attr_writer depth: int
121
+ def dispose: () -> DisposeType
122
+ attr_writer dispose: DisposeType?
123
+ attr_accessor dither: bool
124
+ attr_accessor endian: EndianType
125
+ def extract: () -> String?
126
+ attr_writer extract: (Geometry | string)?
127
+ def filename: () -> String
128
+ attr_writer filename: string?
129
+ def fill: () -> String?
130
+ attr_writer fill: string?
131
+ def font: () -> String?
132
+ attr_writer font: string?
133
+ def format: () -> String?
134
+ attr_writer format: string
135
+ def fuzz: () -> Float
136
+ attr_writer fuzz: magick_percentage
137
+ def gravity: () -> GravityType
138
+ attr_writer gravity: GravityType?
139
+ attr_accessor image_type: ImageType
140
+ attr_accessor interlace: InterlaceType
141
+ def label: () -> String?
142
+ attr_writer label: string?
143
+ def matte_color: () -> String
144
+ attr_writer matte_color: magick_color
145
+ attr_accessor monochrome: bool
146
+ def number_scenes: () -> Integer
147
+ attr_writer number_scenes: int
148
+ attr_accessor orientation: OrientationType
149
+ def origin: () -> String?
150
+ attr_writer origin: (Geometry | string)?
151
+ def page: () -> String?
152
+ attr_writer page: (Geometry | string)?
153
+ def pointsize: () -> Float
154
+ attr_writer pointsize: magick_real
155
+ def quality: () -> Integer
156
+ attr_writer quality: int
157
+ def sampling_factor: () -> String?
158
+ attr_writer sampling_factor: string?
159
+ def scene: () -> Integer
160
+ attr_writer scene: int
161
+ def server_name: () -> String?
162
+ attr_writer server_name: string?
163
+ def size: () -> String?
164
+ attr_writer size: (Geometry | string)?
165
+ def stroke: () -> String?
166
+ attr_writer stroke: string?
167
+ def stroke_width: () -> Float?
168
+ attr_writer stroke_width: magick_real?
169
+ attr_writer texture: Image | nil
170
+ def tile_offset: () -> String?
171
+ attr_writer tile_offset: (Geometry | string)?
172
+ def transparent_color: () -> String
173
+ attr_writer transparent_color: magick_color
174
+ def undercolor: () -> String?
175
+ attr_writer undercolor: string?
176
+ attr_accessor units: ResolutionType
177
+ def view: () -> String?
178
+ attr_writer view: string?
179
+ end
180
+
181
+ class DrawOptions
182
+ def initialize: () -> void
183
+
184
+ include DrawAttribute
185
+ end
186
+
187
+ class PolaroidOptions
188
+ def initialize: () -> void
189
+
190
+ attr_writer shadow_color: magick_color
191
+ attr_writer border_color: magick_color
192
+
193
+ include DrawAttribute
194
+ end
195
+ end
196
+ end
@@ -0,0 +1,183 @@
1
+ module Magick
2
+ class ImageList
3
+ include Enumerable[Image]
4
+ include Comparable
5
+ # The methods of Magick::Image class can be called via method_missing
6
+ include _ImageCommonMethods
7
+
8
+ private
9
+
10
+ def get_current: () -> Integer?
11
+
12
+ public
13
+
14
+ def assert_image: (untyped obj) -> void
15
+
16
+ # Ensure array is always an array of Magick::Image objects
17
+ def assert_image_array: (untyped ary) -> void
18
+
19
+ # Find old current image, update scene number
20
+ # current is the id of the old current image.
21
+ def set_current: (untyped current) -> void
22
+
23
+ def scene: () -> Integer?
24
+ def scene=: (int? n) -> Integer?
25
+ def &: (ImageList | Array[Image] other) -> ImageList
26
+ def +: (ImageList | Array[Image] other) -> ImageList
27
+ def -: (ImageList | Array[Image] other) -> ImageList
28
+ def |: (ImageList | Array[Image] other) -> ImageList
29
+ def *: (Integer other) -> ImageList
30
+ def <<: (Image obj) -> self
31
+ def <=>: (untyped other) -> (Integer | nil)
32
+ def []: (int nth) -> Image?
33
+ | (Range[Integer] range) -> ImageList
34
+ | (int start, int length) -> ImageList
35
+ def []=: (int nth, magick_image | Array[Image] image) -> void
36
+ | (Range[Integer] range, magick_image | Array[Image] image) -> void
37
+ | (int start, int length, magick_image | Array[Image] image) -> void
38
+ def at: () -> Image
39
+ def each: () -> Enumerator[Image, self]
40
+ | () { (Image) -> void} -> void
41
+ def each_index: () -> Enumerator[Integer, self]
42
+ | () { (Integer) -> void } -> void
43
+ def empty?: () -> bool
44
+ def fetch: (int index) -> Image
45
+ | [T] (int index, T default) -> (Image | T)
46
+ | [T] (int index) { (Integer index) -> T } -> (Integer | T)
47
+ def first: () -> Image?
48
+ | (int n) -> Array[Image]
49
+ def hash: () -> Integer
50
+ def include?: (untyped obj) -> bool
51
+ def index: (Image | ImageList | Array[Image] obj) -> ::Integer?
52
+ | () { (Image) -> bool } -> Integer?
53
+ | () -> ::Enumerator[Image, Integer?]
54
+ def length: () -> Integer
55
+ def rindex: (Image | ImageList | Array[Image] obj) -> ::Integer?
56
+ | () { (Image) -> bool } -> Integer?
57
+ | () -> ::Enumerator[Image, Integer?]
58
+ def sort!: () -> self
59
+ | () { (Image a, Image b) -> Integer } -> self
60
+ def clear: () -> void
61
+ def clone: () -> ImageList
62
+ | ...
63
+ def collect: () { (Image) -> Image } -> ImageList
64
+ def collect!: () { (Image) -> Image } -> self
65
+ def copy: -> ImageList
66
+ | ...
67
+ def cur_image: -> Image
68
+ | ...
69
+ alias map collect
70
+ alias __map__ collect
71
+ alias map! collect!
72
+ alias __map__! collect!
73
+ def compact: -> ImageList
74
+ def compact!: -> self?
75
+ def concat: (ImageList | Array[Image] other) -> self
76
+ def delay=: (int d) -> void
77
+ def delete: (Image obj) -> Image?
78
+ | [T] (Image obj) { (Image) -> T } -> (Image | T)
79
+ def delete_at: (int ndx) -> Image?
80
+ def delete_if: () { (Image) -> bool } -> self
81
+ | () -> self
82
+ def dup: -> ImageList
83
+ | ...
84
+ def eql?: (ImageList | Array[Image] other) -> bool
85
+ def fill: (Image image, ?int start, ?int length) -> ImageList
86
+ | (Image image, Range[Integer] range) -> ImageList
87
+ | (?int start, ?int length) { (Integer index) -> Image } -> ImageList
88
+ | (Range[Integer] range) { (Integer index) -> Image } -> ImageList
89
+ def find_all: () { (Image) -> bool } -> ImageList
90
+ | () -> ImageList
91
+ alias select find_all
92
+ def from_blob: (string blob) -> self
93
+ | (string blob) { (Image::Info) -> void } -> self
94
+ def initialize: (*(File | string) filenames) -> void
95
+ | (*(File | string) filenames) { (Image::Info) -> void } -> void
96
+ def insert: (int index, *Image args) -> self
97
+ def iterations=: (int n) -> void
98
+ def last: () -> Image?
99
+ | (int n) -> ImageList
100
+ def marshal_dump: () -> (Array[(Integer | String)?])
101
+ def marshal_load: (Array[(Integer | String)?] ary) -> void
102
+ def method_missing: (untyped meth_id, *untyped args) ?{ (*untyped, **untyped) -> untyped } -> untyped
103
+ def new_image: (int cols, int rows, ?magick_fill fill) -> self
104
+ | (int cols, int rows, ?magick_fill fill) { (Image::Info) -> void } -> self
105
+ def partition: () { (Image) -> bool } -> [ImageList, ImageList]
106
+ def ping: (*(File | string) files) -> self
107
+ | (*(File | string) files) { (Image::Info) -> void } -> self
108
+ def pop: () -> Image?
109
+ def push: (*Image objs) -> self
110
+ def read: (*(File | string) files) -> self
111
+ | (*(File | string) files) { (Image::Info) -> void } -> self
112
+ def reject: () { (Image) -> bool } -> ImageList
113
+ def reject!: () { (Image) -> bool } -> self?
114
+ def replace: (ImageList | Array[Image] other) -> ImageList
115
+ def respond_to?: (interned meth_id, ?bool priv) -> bool
116
+ def reverse: -> ImageList
117
+ def reverse!: -> self
118
+ def reverse_each: () { (Image) -> void } -> self
119
+ def shift: () -> Image?
120
+ def slice: (int index) -> ImageList?
121
+ | (int start, int length) -> ImageList?
122
+ | (Range[Integer] range) -> ImageList?
123
+ def slice!: (int index) -> Image?
124
+ | (int start, int length) -> Image?
125
+ | (Range[Integer] range) -> Image?
126
+ def ticks_per_second=: (int t) -> void
127
+ def to_a: () -> Array[Image]
128
+ def uniq: -> ImageList
129
+ def uniq!: () -> self?
130
+ def unshift: (Image obj) -> self
131
+ def values_at: (*int index) -> ImageList
132
+ | (Range[Integer] range) -> ImageList
133
+
134
+ alias __display__ display
135
+ def remap: (?magick_image? remap_image, ?DitherMethod dither_method) -> self
136
+ | ...
137
+ def animate: (?int delay) -> self
138
+ | (?int delay) { (Image::Info) -> void } -> self
139
+ def append: (bool stack_arg) -> Image
140
+ def average: () -> Image
141
+ def coalesce: () -> ImageList
142
+ def combine: (?ColorspaceType colorspace) -> Image
143
+ def composite_layers: (ImageList images, ?CompositeOperator composite_op) -> ImageList
144
+ def deconstruct: () -> ImageList
145
+ def display: () -> self
146
+ | () { (Image::Info) -> void } -> self
147
+ def flatten_images: () -> Image
148
+ def montage: () -> ImageList
149
+ | () { (ImageList::Montage) -> void } -> ImageList
150
+ def morph: (int nimages) -> ImageList
151
+ def mosaic: () -> Image
152
+ def optimize_layers: (LayerMethod method) -> ImageList
153
+ def quantize: (?int number_colors, ?ColorspaceType colorspace, ?(DitherMethod | bool) dither, ?int tree_depth, ?bool measure_error) -> ImageList
154
+ def to_blob: () -> String?
155
+ | () { (Image::Info) -> void} -> String?
156
+ def write: (File | string file) -> self
157
+ | (File | string file) { (Image::Info) -> void } -> self
158
+ def destroy!: () -> self
159
+ def destroyed?: () -> bool
160
+
161
+ class Montage
162
+ def initialize: () -> void
163
+
164
+ attr_writer background_color: magick_color
165
+ attr_writer border_color: magick_color
166
+ attr_writer border_width: int
167
+ attr_writer compose: CompositeOperator
168
+ attr_writer filename: string
169
+ attr_writer fill: magick_color
170
+ attr_writer font: string
171
+ attr_writer frame: Geometry | string
172
+ attr_writer geometry: Geometry | string
173
+ attr_writer gravity: GravityType
174
+ attr_writer matte_color: magick_color
175
+ attr_writer pointsize: magick_real
176
+ attr_writer shadow: bool
177
+ attr_writer stroke: magick_color
178
+ attr_writer texture: magick_image
179
+ attr_writer tile: Geometry | string
180
+ attr_writer title: string
181
+ end
182
+ end
183
+ end
@@ -0,0 +1,101 @@
1
+ module Magick
2
+ module IPTC
3
+ module Envelope
4
+ Model_Version: String
5
+ Destination: String
6
+ File_Format: String
7
+ File_Format_Version: String
8
+ Service_Identifier: String
9
+ Envelope_Number: String
10
+ Product_ID: String
11
+ Envelope_Priority: String
12
+ Date_Sent: String
13
+ Time_Sent: String
14
+ Coded_Character_Set: String
15
+ UNO: String
16
+ Unique_Name_of_Object: String
17
+ ARM_Identifier: String
18
+ ARM_Version: String
19
+ end
20
+
21
+ module Application
22
+ Record_Version: String
23
+ Object_Type_Reference: String
24
+ Object_Name: String
25
+ Title: String
26
+ Edit_Status: String
27
+ Editorial_Update: String
28
+ Urgency: String
29
+ Subject_Reference: String
30
+ Category: String
31
+ Supplemental_Category: String
32
+ Fixture_Identifier: String
33
+ Keywords: String
34
+ Content_Location_Code: String
35
+ Content_Location_Name: String
36
+ Release_Date: String
37
+ Release_Time: String
38
+ Expiration_Date: String
39
+ Expiration_Time: String
40
+ Special_Instructions: String
41
+ Action_Advised: String
42
+ Reference_Service: String
43
+ Reference_Date: String
44
+ Reference_Number: String
45
+ Date_Created: String
46
+ Time_Created: String
47
+ Digital_Creation_Date: String
48
+ Digital_Creation_Time: String
49
+ Originating_Program: String
50
+ Program_Version: String
51
+ Object_Cycle: String
52
+ By_Line: String
53
+ Author: String
54
+ By_Line_Title: String
55
+ Author_Position: String
56
+ City: String
57
+ Sub_Location: String
58
+ Province: String
59
+ State: String
60
+ Country_Primary_Location_Code: String
61
+ Country_Primary_Location_Name: String
62
+ Original_Transmission_Reference: String
63
+ Headline: String
64
+ Credit: String
65
+ Source: String
66
+ Copyright_Notice: String
67
+ Contact: String
68
+ Abstract: String
69
+ Caption: String
70
+ Editor: String
71
+ Caption_Writer: String
72
+ Rasterized_Caption: String
73
+ Image_Type: String
74
+ Image_Orientation: String
75
+ Language_Identifier: String
76
+ Audio_Type: String
77
+ Audio_Sampling_Rate: String
78
+ Audio_Sampling_Resolution: String
79
+ Audio_Duration: String
80
+ Audio_Outcue: String
81
+ ObjectData_Preview_File_Format: String
82
+ ObjectData_Preview_File_Format_Version: String
83
+ ObjectData_Preview_Data: String
84
+ end
85
+
86
+ module Pre_ObjectData_Descriptor
87
+ Size_Mode: String
88
+ Max_Subfile_Size: String
89
+ ObjectData_Size_Announced: String
90
+ Maximum_ObjectData_Size: String
91
+ end
92
+
93
+ module ObjectData
94
+ Subfile: String
95
+ end
96
+
97
+ module Post_ObjectData_Descriptor
98
+ Confirmed_ObjectData_Size: String
99
+ end
100
+ end
101
+ end
@@ -0,0 +1,12 @@
1
+ module Magick
2
+ class KernelInfo
3
+ def self.builtin: (KernelInfoType what, string geometry) -> KernelInfo
4
+
5
+ def initialize: (string kernel_string) -> void
6
+ def unity_add: (magick_real scale) -> nil
7
+ def scale: (magick_real scale, GeometryFlags flags) -> nil
8
+ def scale_geometry: (string geometry) -> nil
9
+ def clone: () -> KernelInfo
10
+ def dup: () -> KernelInfo
11
+ end
12
+ end
@@ -0,0 +1,10 @@
1
+ module Magick
2
+ class OptionalMethodArguments
3
+ attr_writer highlight_color: magick_color
4
+ attr_writer lowlight_color: magick_color
5
+
6
+ def initialize: (magick_image img) -> void
7
+ def define: (string key, ?string? value) -> String
8
+ def method_missing: (untyped mth, untyped val) ?{ (*untyped, **untyped) -> untyped } -> untyped
9
+ end
10
+ end
@@ -0,0 +1,46 @@
1
+ module Magick
2
+ class Pixel
3
+ # TODO:
4
+ # include Observable
5
+
6
+ include Comparable
7
+
8
+ # RGBA attributes
9
+ def red: () -> Integer
10
+ attr_writer red: real
11
+ def green: () -> Integer
12
+ attr_writer green: real
13
+ def blue: () -> Integer
14
+ attr_writer blue: real
15
+ def alpha: () -> Integer
16
+ attr_writer alpha: real
17
+
18
+ # CMYK attributes
19
+ def cyan: () -> Integer
20
+ attr_writer cyan: real
21
+ def magenta: () -> Integer
22
+ attr_writer magenta: real
23
+ def yellow: () -> Integer
24
+ attr_writer yellow: real
25
+ def black: () -> Integer
26
+ attr_writer black: real
27
+
28
+ def self.from_color: (string name) -> Pixel
29
+ def self.from_hsla: (magick_percentage hue, magick_percentage saturation, magick_percentage lightness, magick_percentage alpha) -> Pixel
30
+
31
+ def <=>: (untyped other) -> (-1 | 0 | 1 | nil)
32
+ def ===: (untyped other) -> bool
33
+ def eql?: (untyped other) -> bool
34
+ def initialize: (?real red, ?real green, ?real blue, ?real opacity) -> void
35
+ def clone: () -> Pixel
36
+ def dup: () -> Pixel
37
+ def fcmp: (magick_color other, ?magick_real fuzz, ?ColorspaceType colorspace) -> bool
38
+ def hash: () -> Integer
39
+ def intensity: () -> Integer
40
+ def marshal_dump: () -> Hash[Symbol, Integer]
41
+ def marshal_load: (Hash[Symbol, Integer] dpixel) -> self
42
+ def to_color: (?ComplianceType compliance, ?bool alpha, ?int depth, ?bool hex) -> String
43
+ def to_hsla: () -> [Float, Float, Float, Float]
44
+ def to_s: () -> String
45
+ end
46
+ end
@@ -0,0 +1,90 @@
1
+ module Magick
2
+ class AffineMatrix < Struct[untyped]
3
+ attr_accessor sx: real
4
+ attr_accessor rx: real
5
+ attr_accessor ry: real
6
+ attr_accessor sy: real
7
+ attr_accessor tx: real
8
+ attr_accessor ty: real
9
+
10
+ def self.new: (?real? sx, ?real? rx, ?real? ry, ?real? sy, ?real? tx, ?real? ty) -> AffineMatrix
11
+ end
12
+
13
+ class Primary < Struct[untyped]
14
+ attr_accessor x: real
15
+ attr_accessor y: real
16
+ attr_accessor z: real
17
+
18
+ def self.new: (?real? x, ?real? y, ?real? z) -> Primary
19
+ end
20
+
21
+ class Chromaticity < Struct[untyped]
22
+ attr_accessor red_primary: Primary
23
+ attr_accessor green_primary: Primary
24
+ attr_accessor blue_primary: Primary
25
+ attr_accessor white_point: Primary
26
+
27
+ def self.new: (?Primary? red_primary, ?Primary? green_primary, ?Primary? blue_primary, ?Primary? white_point) -> Chromaticity
28
+ end
29
+
30
+ class Color < Struct[untyped]
31
+ attr_accessor name: String
32
+ attr_accessor compliance: ComplianceType
33
+ attr_accessor color: Pixel
34
+
35
+ def self.new: (?String? name, ?ComplianceType? compliance, ?Pixel? color) -> Color
36
+ end
37
+
38
+ class Point < Struct[untyped]
39
+ attr_accessor x: real
40
+ attr_accessor y: real
41
+
42
+ def self.new: (?real? x, ?real? y) -> Point
43
+ end
44
+
45
+ class Rectangle < Struct[untyped]
46
+ attr_accessor width: real
47
+ attr_accessor height: real
48
+ attr_accessor x: real
49
+ attr_accessor y: real
50
+
51
+ def self.new: (?real? width, ?real? height, ?real? x, ?real? y) -> Rectangle
52
+ end
53
+
54
+ class Segment < Struct[untyped]
55
+ attr_accessor x1: real
56
+ attr_accessor y1: real
57
+ attr_accessor x2: real
58
+ attr_accessor y2: real
59
+
60
+ def self.new: (?real? x1, ?real? y1, ?real? x2, ?real? y2) -> Segment
61
+ end
62
+
63
+ class Font < Struct[untyped]
64
+ attr_accessor name: String
65
+ attr_accessor description: String
66
+ attr_accessor family: String
67
+ attr_accessor style: StyleType
68
+ attr_accessor stretch: StretchType
69
+ attr_accessor weight: Integer
70
+ attr_accessor encoding: String
71
+ attr_accessor foundry: String
72
+ attr_accessor format: String
73
+
74
+ def self.new: (?String? name, ?String? description, ?String? family, ?StyleType? style, ?StretchType? stretch, ?Integer? weight, ?String? encoding, ?String? foundry, ?String? format) -> Font
75
+ end
76
+
77
+ class TypeMetric < Struct[untyped]
78
+ attr_accessor pixels_per_em: Point
79
+ attr_accessor ascent: Float
80
+ attr_accessor descent: Float
81
+ attr_accessor width: Float
82
+ attr_accessor height: Float
83
+ attr_accessor max_advance: Float
84
+ attr_accessor bounds: Segment
85
+ attr_accessor underline_position: Float
86
+ attr_accessor underline_thickness: Float
87
+
88
+ def self.new: (?Point? pixels_per_em, ?magick_real? ascent, ?magick_real? descent, ?magick_real? width, ?magick_real? height, ?magick_real? max_advance, ?Segment? bounds, ?magick_real? underline_position, ?magick_real? underline_thickness) -> TypeMetric
89
+ end
90
+ end