Class: Imagekitio::Models::TextOverlay

Inherits:
BaseOverlay show all
Defined in:
lib/imagekitio/models/text_overlay.rb

Defined Under Namespace

Modules: Encoding

Instance Attribute Summary collapse

Attributes inherited from BaseOverlay

#layer_mode, #position, #timing

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(text:, encoding: nil, transformation: nil, type: :text) ⇒ Object

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

Parameters:

  • Specifies the text to be displayed in the overlay. The SDK automatically handles

  • (defaults to: nil)

    Text can be included in the layer as either ‘i-input` (plain text) or `ie-{bas

  • (defaults to: nil)

    Control styling of the text overlay. See [Text overlays](imagekit.io/doc

  • (defaults to: :text)


# File 'lib/imagekitio/models/text_overlay.rb', line 39


Instance Attribute Details

#encodingSymbol, ...

Text can be included in the layer as either ‘i-input` (plain text) or `ie-base64_encoded_input` (base64). By default, the SDK selects the appropriate format based on the input text. To always use base64 (`ie-base64`), set this parameter to base64. To always use plain text (`i-input`), set it to plain.

Regardless of the encoding method, the input text is always percent-encoded to ensure it is URL-safe.

Returns:



29
# File 'lib/imagekitio/models/text_overlay.rb', line 29

optional :encoding, enum: -> { Imagekitio::TextOverlay::Encoding }

#textString

Specifies the text to be displayed in the overlay. The SDK automatically handles special characters and encoding.

Returns:



11
# File 'lib/imagekitio/models/text_overlay.rb', line 11

required :text, String

#transformationArray<Imagekitio::Models::TextOverlayTransformation>?

Control styling of the text overlay. See [Text overlays](imagekit.io/docs/add-overlays-on-images#text-overlay).

Returns:



36
37
# File 'lib/imagekitio/models/text_overlay.rb', line 36

optional :transformation,
-> { Imagekitio::Internal::Type::ArrayOf[Imagekitio::TextOverlayTransformation] }

#typeSymbol, :text

Returns:



16
# File 'lib/imagekitio/models/text_overlay.rb', line 16

required :type, const: :text