33module Imagekitio
44 module Models
55 class OverlayPosition < Imagekitio ::Internal ::Type ::BaseModel
6+ # @!attribute anchor_point
7+ # Sets the anchor point on the base asset from which the overlay offset is
8+ # calculated. The default value is `top_left`. Maps to `lap` in the URL. Can only
9+ # be used with one or more of `x`, `y`, `xCenter`, or `yCenter`.
10+ #
11+ # @return [Symbol, Imagekitio::Models::OverlayPosition::AnchorPoint, nil]
12+ optional :anchor_point , enum : -> { Imagekitio ::OverlayPosition ::AnchorPoint } , api_name : :anchorPoint
13+
614 # @!attribute focus
7- # Specifies the position of the overlay relative to the parent image or video.
8- # Maps to `lfo` in the URL.
15+ # Specifies the position of the overlay relative to the parent image or video. If
16+ # one or more of `x`, `y`, `xCenter`, or `yCenter` parameters are specified, this
17+ # parameter is ignored. Maps to `lfo` in the URL.
918 #
1019 # @return [Symbol, Imagekitio::Models::OverlayPosition::Focus, nil]
1120 optional :focus , enum : -> { Imagekitio ::OverlayPosition ::Focus }
@@ -20,6 +29,16 @@ class OverlayPosition < Imagekitio::Internal::Type::BaseModel
2029 # @return [Float, String, nil]
2130 optional :x , union : -> { Imagekitio ::OverlayPosition ::X }
2231
32+ # @!attribute x_center
33+ # Specifies the x-coordinate on the base asset where the overlay's center will be
34+ # positioned. It also accepts arithmetic expressions such as `bw_mul_0.4` or
35+ # `bw_sub_cw`. Maps to `lxc` in the URL. Cannot be used together with `x`, but can
36+ # be used with `y`. Learn about
37+ # [Arithmetic expressions](https://imagekit.io/docs/arithmetic-expressions-in-transformations).
38+ #
39+ # @return [Float, String, nil]
40+ optional :x_center , union : -> { Imagekitio ::OverlayPosition ::XCenter } , api_name : :xCenter
41+
2342 # @!attribute y_
2443 # Specifies the y-coordinate of the top-left corner of the base asset where the
2544 # overlay's top-left corner will be positioned. It also accepts arithmetic
@@ -30,18 +49,57 @@ class OverlayPosition < Imagekitio::Internal::Type::BaseModel
3049 # @return [Float, String, nil]
3150 optional :y_ , union : -> { Imagekitio ::OverlayPosition ::Y } , api_name : :y
3251
33- # @!method initialize(focus: nil, x: nil, y_: nil)
52+ # @!attribute y_center
53+ # Specifies the y-coordinate on the base asset where the overlay's center will be
54+ # positioned. It also accepts arithmetic expressions such as `bh_mul_0.4` or
55+ # `bh_sub_ch`. Maps to `lyc` in the URL. Cannot be used together with `y`, but can
56+ # be used with `x`. Learn about
57+ # [Arithmetic expressions](https://imagekit.io/docs/arithmetic-expressions-in-transformations).
58+ #
59+ # @return [Float, String, nil]
60+ optional :y_center , union : -> { Imagekitio ::OverlayPosition ::YCenter } , api_name : :yCenter
61+
62+ # @!method initialize(anchor_point: nil, focus: nil, x: nil, x_center: nil, y_: nil, y_center: nil)
3463 # Some parameter documentations has been truncated, see
3564 # {Imagekitio::Models::OverlayPosition} for more details.
3665 #
66+ # @param anchor_point [Symbol, Imagekitio::Models::OverlayPosition::AnchorPoint] Sets the anchor point on the base asset from which the overlay offset is calcula
67+ #
3768 # @param focus [Symbol, Imagekitio::Models::OverlayPosition::Focus] Specifies the position of the overlay relative to the parent image or video.
3869 #
3970 # @param x [Float, String] Specifies the x-coordinate of the top-left corner of the base asset where the ov
4071 #
72+ # @param x_center [Float, String] Specifies the x-coordinate on the base asset where the overlay's center will be
73+ #
4174 # @param y_ [Float, String] Specifies the y-coordinate of the top-left corner of the base asset where the ov
75+ #
76+ # @param y_center [Float, String] Specifies the y-coordinate on the base asset where the overlay's center will be
77+
78+ # Sets the anchor point on the base asset from which the overlay offset is
79+ # calculated. The default value is `top_left`. Maps to `lap` in the URL. Can only
80+ # be used with one or more of `x`, `y`, `xCenter`, or `yCenter`.
81+ #
82+ # @see Imagekitio::Models::OverlayPosition#anchor_point
83+ module AnchorPoint
84+ extend Imagekitio ::Internal ::Type ::Enum
85+
86+ TOP = :top
87+ LEFT = :left
88+ RIGHT = :right
89+ BOTTOM = :bottom
90+ TOP_LEFT = :top_left
91+ TOP_RIGHT = :top_right
92+ BOTTOM_LEFT = :bottom_left
93+ BOTTOM_RIGHT = :bottom_right
94+ CENTER = :center
95+
96+ # @!method self.values
97+ # @return [Array<Symbol>]
98+ end
4299
43- # Specifies the position of the overlay relative to the parent image or video.
44- # Maps to `lfo` in the URL.
100+ # Specifies the position of the overlay relative to the parent image or video. If
101+ # one or more of `x`, `y`, `xCenter`, or `yCenter` parameters are specified, this
102+ # parameter is ignored. Maps to `lfo` in the URL.
45103 #
46104 # @see Imagekitio::Models::OverlayPosition#focus
47105 module Focus
@@ -79,6 +137,24 @@ module X
79137 # @return [Array(Float, String)]
80138 end
81139
140+ # Specifies the x-coordinate on the base asset where the overlay's center will be
141+ # positioned. It also accepts arithmetic expressions such as `bw_mul_0.4` or
142+ # `bw_sub_cw`. Maps to `lxc` in the URL. Cannot be used together with `x`, but can
143+ # be used with `y`. Learn about
144+ # [Arithmetic expressions](https://imagekit.io/docs/arithmetic-expressions-in-transformations).
145+ #
146+ # @see Imagekitio::Models::OverlayPosition#x_center
147+ module XCenter
148+ extend Imagekitio ::Internal ::Type ::Union
149+
150+ variant Float
151+
152+ variant String
153+
154+ # @!method self.variants
155+ # @return [Array(Float, String)]
156+ end
157+
82158 # Specifies the y-coordinate of the top-left corner of the base asset where the
83159 # overlay's top-left corner will be positioned. It also accepts arithmetic
84160 # expressions such as `bh_mul_0.4` or `bh_sub_ch`. Maps to `ly` in the URL. Learn
@@ -96,6 +172,24 @@ module Y
96172 # @!method self.variants
97173 # @return [Array(Float, String)]
98174 end
175+
176+ # Specifies the y-coordinate on the base asset where the overlay's center will be
177+ # positioned. It also accepts arithmetic expressions such as `bh_mul_0.4` or
178+ # `bh_sub_ch`. Maps to `lyc` in the URL. Cannot be used together with `y`, but can
179+ # be used with `x`. Learn about
180+ # [Arithmetic expressions](https://imagekit.io/docs/arithmetic-expressions-in-transformations).
181+ #
182+ # @see Imagekitio::Models::OverlayPosition#y_center
183+ module YCenter
184+ extend Imagekitio ::Internal ::Type ::Union
185+
186+ variant Float
187+
188+ variant String
189+
190+ # @!method self.variants
191+ # @return [Array(Float, String)]
192+ end
99193 end
100194 end
101195end
0 commit comments