Class: Imagekitio::Models::BaseOverlay
- Inherits:
-
Internal::Type::BaseModel
- Object
- Internal::Type::BaseModel
- Imagekitio::Models::BaseOverlay
- Defined in:
- lib/imagekitio/models/base_overlay.rb
Direct Known Subclasses
ImageOverlay, SolidColorOverlay, SubtitleOverlay, TextOverlay, VideoOverlay
Defined Under Namespace
Modules: LayerMode
Instance Attribute Summary collapse
-
#layer_mode ⇒ Symbol, ...
Controls how the layer blends with the base image or underlying content.
-
#position ⇒ Imagekitio::Models::OverlayPosition?
Specifies the overlay’s position relative to the parent asset.
-
#timing ⇒ Imagekitio::Models::OverlayTiming?
Specifies timing information for the overlay (only applicable if the base asset is a video).
Instance Method Summary collapse
-
#initialize(layer_mode: nil, position: nil, timing: nil) ⇒ Object
constructor
Some parameter documentations has been truncated, see BaseOverlay for more details.
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(layer_mode: nil, position: nil, timing: nil) ⇒ Object
Some parameter documentations has been truncated, see Imagekitio::Models::BaseOverlay for more details.
|
|
# File 'lib/imagekitio/models/base_overlay.rb', line 46
|
Instance Attribute Details
#layer_mode ⇒ Symbol, ...
Controls how the layer blends with the base image or underlying content. Maps to lm in the URL. By default, layers completely cover the base image beneath them. Layer modes change this behavior:
-
multiply: Multiplies the pixel values of the layer with the base image. The result is always darker than the original images. This is ideal for applying shadows or color tints. -
displace: Uses the layer as a displacement map to distort pixels in the base image. The red channel controls horizontal displacement, and the green channel controls vertical displacement. Requiresxoryparameter to control displacement magnitude. -
cutout: Acts as an inverse mask where opaque areas of the layer turn the base image transparent, while transparent areas leave the base image unchanged. This mode functions like a hole-punch, effectively cutting the shape of the layer out of the underlying image. -
cutter: Acts as a shape mask where only the parts of the base image that fall inside the opaque area of the layer are preserved. This mode functions like a cookie-cutter, trimming the base image to match the specific dimensions and shape of the layer. See [Layer modes](imagekit.io/docs/add-overlays-on-images#layer-modes).
29 |
# File 'lib/imagekitio/models/base_overlay.rb', line 29 optional :layer_mode, enum: -> { Imagekitio::BaseOverlay::LayerMode }, api_name: :layerMode |
#position ⇒ Imagekitio::Models::OverlayPosition?
Specifies the overlay’s position relative to the parent asset. See [Position of Layer](imagekit.io/docs/transformations#position-of-layer).
36 |
# File 'lib/imagekitio/models/base_overlay.rb', line 36 optional :position, -> { Imagekitio::OverlayPosition } |
#timing ⇒ Imagekitio::Models::OverlayTiming?
Specifies timing information for the overlay (only applicable if the base asset is a video). See [Position of Layer](imagekit.io/docs/transformations#position-of-layer).
44 |
# File 'lib/imagekitio/models/base_overlay.rb', line 44 optional :timing, -> { Imagekitio::OverlayTiming } |