Class: Imagekitio::Models::OverlayPosition

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/imagekitio/models/overlay_position.rb,
sig/imagekitio/models/overlay_position.rbs

Defined Under Namespace

Modules: AnchorPoint, Focus, X, XCenter, Y, YCenter

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Internal::Type::BaseModel

==, #==, #[], coerce, #deconstruct_keys, #deep_to_h, dump, fields, hash, #hash, inherited, inspect, #inspect, known_fields, optional, recursively_to_h, required, #to_h, #to_json, #to_s, to_sorbet_type, #to_yaml

Methods included from Internal::Type::Converter

#coerce, coerce, #dump, dump, #inspect, inspect, meta_info, new_coerce_state, type_info

Methods included from Internal::Util::SorbetRuntimeSupport

#const_missing, #define_sorbet_constant!, #sorbet_constant_defined?, #to_sorbet_type, to_sorbet_type

Constructor Details

#initialize(anchor_point: nil, focus: nil, x: nil, x_center: nil, y_: nil, y_center: nil) ⇒ Object

Some parameter documentations has been truncated, see Imagekitio::Models::OverlayPosition for more details.

Parameters:

  • anchor_point (Symbol, Imagekitio::Models::OverlayPosition::AnchorPoint) (defaults to: nil)

    Sets the anchor point on the base asset from which the overlay offset is calcula

  • focus (Symbol, Imagekitio::Models::OverlayPosition::Focus) (defaults to: nil)

    Specifies the position of the overlay relative to the parent image or video.

  • x (Float, String) (defaults to: nil)

    Specifies the x-coordinate of the top-left corner of the base asset where the ov

  • x_center (Float, String) (defaults to: nil)

    Specifies the x-coordinate on the base asset where the overlay's center will be

  • y_ (Float, String) (defaults to: nil)

    Specifies the y-coordinate of the top-left corner of the base asset where the ov

  • y_center (Float, String) (defaults to: nil)

    Specifies the y-coordinate on the base asset where the overlay's center will be



# File 'lib/imagekitio/models/overlay_position.rb', line 62

Instance Attribute Details

#anchor_pointSymbol, ...

Sets the anchor point on the base asset from which the overlay offset is calculated. The default value is top_left. Maps to lap in the URL. Can only be used with one or more of x, y, xCenter, or yCenter.



12
# File 'lib/imagekitio/models/overlay_position.rb', line 12

optional :anchor_point, enum: -> { Imagekitio::OverlayPosition::AnchorPoint }, api_name: :anchorPoint

#focusSymbol, ...

Specifies the position of the overlay relative to the parent image or video. If one or more of x, y, xCenter, or yCenter parameters are specified, this parameter is ignored. Maps to lfo in the URL.



20
# File 'lib/imagekitio/models/overlay_position.rb', line 20

optional :focus, enum: -> { Imagekitio::OverlayPosition::Focus }

#xFloat, ...

Specifies the x-coordinate of the top-left corner of the base asset where the overlay's top-left corner will be positioned. It also accepts arithmetic expressions such as bw_mul_0.4 or bw_sub_cw. Maps to lx in the URL. Learn about Arithmetic expressions.

Returns:

  • (Float, String, nil)


30
# File 'lib/imagekitio/models/overlay_position.rb', line 30

optional :x, union: -> { Imagekitio::OverlayPosition::X }

#x_centerFloat, ...

Specifies the x-coordinate on the base asset where the overlay's center will be positioned. It also accepts arithmetic expressions such as bw_mul_0.4 or bw_sub_cw. Maps to lxc in the URL. Cannot be used together with x, but can be used with y. Learn about Arithmetic expressions.

Returns:

  • (Float, String, nil)


40
# File 'lib/imagekitio/models/overlay_position.rb', line 40

optional :x_center, union: -> { Imagekitio::OverlayPosition::XCenter }, api_name: :xCenter

#y_Float, ...

Specifies the y-coordinate of the top-left corner of the base asset where the overlay's top-left corner will be positioned. It also accepts arithmetic expressions such as bh_mul_0.4 or bh_sub_ch. Maps to ly in the URL. Learn about Arithmetic expressions.

Returns:

  • (Float, String, nil)


50
# File 'lib/imagekitio/models/overlay_position.rb', line 50

optional :y_, union: -> { Imagekitio::OverlayPosition::Y }, api_name: :y

#y_centerFloat, ...

Specifies the y-coordinate on the base asset where the overlay's center will be positioned. It also accepts arithmetic expressions such as bh_mul_0.4 or bh_sub_ch. Maps to lyc in the URL. Cannot be used together with y, but can be used with x. Learn about Arithmetic expressions.

Returns:

  • (Float, String, nil)


60
# File 'lib/imagekitio/models/overlay_position.rb', line 60

optional :y_center, union: -> { Imagekitio::OverlayPosition::YCenter }, api_name: :yCenter

Class Method Details

.valuesArray<Symbol>

Returns:

  • (Array<Symbol>)


# File 'lib/imagekitio/models/overlay_position.rb', line 96

.variantsArray(Float, String)

Returns:

  • (Array(Float, String))


# File 'lib/imagekitio/models/overlay_position.rb', line 136

Instance Method Details

#to_hash{

Returns:

  • ({)


59
# File 'sig/imagekitio/models/overlay_position.rbs', line 59

def to_hash: -> {