rmagick 5.4.4 → 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 +43 -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 +24 -6
  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 +1 -1
  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,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,194 @@
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
+
44
+ class View
45
+ attr_reader x: real
46
+ attr_reader y: real
47
+ attr_reader width: real
48
+ attr_reader height: real
49
+ attr_accessor dirty: bool
50
+ def initialize: (Image img, real x, real y, real width, real height) -> void
51
+ def []: (Integer index) -> Rows
52
+ | (Range[Numeric] range) -> Rows
53
+ | (Integer start, Integer length) -> Rows
54
+ def sync: (?bool force) -> bool
55
+ def update: (Rows rows) -> nil
56
+
57
+ class Pixels < Array[untyped]
58
+ # include Observable
59
+ def red: () -> Array[Integer]
60
+ attr_writer red: Integer
61
+ def green: () -> Array[Integer]
62
+ attr_writer green: Integer
63
+ def blue: () -> Array[Integer]
64
+ attr_writer blue: Integer
65
+ def opacity: () -> Array[Integer]
66
+ attr_writer opacity: Integer
67
+ end
68
+
69
+ class Rows
70
+ # include Observable
71
+ def initialize: (View view, real width, real height, Rows rows) -> void
72
+ def []: () -> View::Pixels
73
+ | (Integer index) -> Pixel
74
+ | (Range[Numeric] range) -> View::Pixels
75
+ | (Integer start, Integer length) -> View::Pixels
76
+ def []=: (magick_color value) -> void
77
+ | (Integer index, magick_color value) -> void
78
+ | (Range[Numeric] range, magick_color value) -> void
79
+ | (Integer start, Integer length, magick_color value) -> void
80
+ def update: (Pixels | Pixel pixel) -> nil
81
+
82
+ private
83
+
84
+ def cols: (*untyped args) -> void
85
+ def each: () -> void
86
+ end
87
+ end
88
+
89
+ class Info
90
+ def initialize: () -> void
91
+ def channel: (*ChannelType channel) -> self
92
+ def define: (string format, string key, ?string value) -> self?
93
+ def []=: (string format, string key, string value) -> self?
94
+ | (string key, string value) -> self?
95
+ def []: (string format, string key) -> String?
96
+ | (string key) -> String?
97
+ def undefine: (string format, string key) -> self
98
+
99
+ attr_accessor antialias: bool
100
+ def attenuate: () -> Float
101
+ attr_writer attenuate: magick_real
102
+ attr_accessor authenticate: string?
103
+ def background_color: () -> String
104
+ attr_writer background_color: magick_color
105
+ def border_color: () -> String
106
+ attr_writer border_color: magick_color
107
+ def caption: () -> String
108
+ attr_writer caption: string?
109
+ attr_accessor colorspace: ColorspaceType
110
+ def comment: () -> String
111
+ attr_writer comment: string?
112
+ attr_accessor compression: CompressionType
113
+ def delay: () -> Integer?
114
+ attr_writer delay: int?
115
+ def density: () -> String?
116
+ attr_writer density: (Geometry | string)?
117
+ def depth: () -> Integer
118
+ attr_writer depth: int
119
+ def dispose: () -> DisposeType
120
+ attr_writer dispose: DisposeType?
121
+ attr_accessor dither: bool
122
+ attr_accessor endian: EndianType
123
+ def extract: () -> String?
124
+ attr_writer extract: (Geometry | string)?
125
+ def filename: () -> String
126
+ attr_writer filename: string?
127
+ def fill: () -> String?
128
+ attr_writer fill: string?
129
+ def font: () -> String?
130
+ attr_writer font: string?
131
+ def format: () -> String?
132
+ attr_writer format: string
133
+ def fuzz: () -> Float
134
+ attr_writer fuzz: magick_percentage
135
+ def gravity: () -> GravityType
136
+ attr_writer gravity: GravityType?
137
+ attr_accessor image_type: ImageType
138
+ attr_accessor interlace: InterlaceType
139
+ def label: () -> String?
140
+ attr_writer label: string?
141
+ def matte_color: () -> String
142
+ attr_writer matte_color: magick_color
143
+ attr_accessor monochrome: bool
144
+ def number_scenes: () -> Integer
145
+ attr_writer number_scenes: int
146
+ attr_accessor orientation: OrientationType
147
+ def origin: () -> String?
148
+ attr_writer origin: (Geometry | string)?
149
+ def page: () -> String?
150
+ attr_writer page: (Geometry | string)?
151
+ def pointsize: () -> Float
152
+ attr_writer pointsize: magick_real
153
+ def quality: () -> Integer
154
+ attr_writer quality: int
155
+ def sampling_factor: () -> String?
156
+ attr_writer sampling_factor: string?
157
+ def scene: () -> Integer
158
+ attr_writer scene: int
159
+ def server_name: () -> String?
160
+ attr_writer server_name: string?
161
+ def size: () -> String?
162
+ attr_writer size: (Geometry | string)?
163
+ def stroke: () -> String?
164
+ attr_writer stroke: string?
165
+ def stroke_width: () -> Float?
166
+ attr_writer stroke_width: magick_real?
167
+ attr_writer texture: Image | nil
168
+ def tile_offset: () -> String?
169
+ attr_writer tile_offset: (Geometry | string)?
170
+ def transparent_color: () -> String
171
+ attr_writer transparent_color: magick_color
172
+ def undercolor: () -> String?
173
+ attr_writer undercolor: string?
174
+ attr_accessor units: ResolutionType
175
+ def view: () -> String?
176
+ attr_writer view: string?
177
+ end
178
+
179
+ class DrawOptions
180
+ def initialize: () -> void
181
+
182
+ include DrawAttribute
183
+ end
184
+
185
+ class PolaroidOptions
186
+ def initialize: () -> void
187
+
188
+ attr_writer shadow_color: magick_color
189
+ attr_writer border_color: magick_color
190
+
191
+ include DrawAttribute
192
+ end
193
+ end
194
+ end
@@ -0,0 +1,181 @@
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
+
159
+ class Montage
160
+ def initialize: () -> void
161
+
162
+ attr_writer background_color: magick_color
163
+ attr_writer border_color: magick_color
164
+ attr_writer border_width: int
165
+ attr_writer compose: CompositeOperator
166
+ attr_writer filename: string
167
+ attr_writer fill: magick_color
168
+ attr_writer font: string
169
+ attr_writer frame: Geometry | string
170
+ attr_writer geometry: Geometry | string
171
+ attr_writer gravity: GravityType
172
+ attr_writer matte_color: magick_color
173
+ attr_writer pointsize: magick_real
174
+ attr_writer shadow: bool
175
+ attr_writer stroke: magick_color
176
+ attr_writer texture: magick_image
177
+ attr_writer tile: Geometry | string
178
+ attr_writer title: string
179
+ end
180
+ end
181
+ 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