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

#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:



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

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`.



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

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:

  • (String)


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).



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

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

#typeSymbol, :text

Returns:

  • (Symbol, :text)


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

required :type, const: :text