Class: Imagekitio::Models::TextOverlayTransformation
- Inherits:
-
Internal::Type::BaseModel
- Object
- Internal::Type::BaseModel
- Imagekitio::Models::TextOverlayTransformation
- Defined in:
- lib/imagekitio/models/text_overlay_transformation.rb
Defined Under Namespace
Modules: Flip, FontSize, InnerAlignment, LineHeight, Padding, Radius, Rotation, Width
Instance Attribute Summary collapse
-
#alpha ⇒ Float?
Specifies the transparency level of the text overlay.
-
#background ⇒ String?
Specifies the background color of the text overlay.
-
#flip ⇒ Symbol, ...
Flip the text overlay horizontally, vertically, or both.
-
#font_color ⇒ String?
Specifies the font color of the overlaid text.
-
#font_family ⇒ String?
Specifies the font family of the overlaid text.
-
#font_size ⇒ Float, ...
Specifies the font size of the overlaid text.
-
#inner_alignment ⇒ Symbol, ...
Specifies the inner alignment of the text when width is more than the text length.
-
#line_height ⇒ Float, ...
Specifies the line height of the text overlay.
-
#padding ⇒ Float, ...
Specifies the padding around the overlaid text.
-
#radius ⇒ Float, ...
Specifies the corner radius of the text overlay.
-
#rotation ⇒ Float, ...
Specifies the rotation angle of the text overlay.
-
#typography ⇒ String?
Specifies the typography style of the text.
-
#width ⇒ Float, ...
Specifies the maximum width (in pixels) of the overlaid text.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(alpha: nil, background: nil, flip: nil, font_color: nil, font_family: nil, font_size: nil, inner_alignment: nil, line_height: nil, padding: nil, radius: nil, rotation: nil, typography: nil, width: nil) ⇒ Object
constructor
Some parameter documentations has been truncated, see TextOverlayTransformation 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(alpha: nil, background: nil, flip: nil, font_color: nil, font_family: nil, font_size: nil, inner_alignment: nil, line_height: nil, padding: nil, radius: nil, rotation: nil, typography: nil, width: nil) ⇒ Object
Some parameter documentations has been truncated, see Imagekitio::Models::TextOverlayTransformation for more details.
|
|
# File 'lib/imagekitio/models/text_overlay_transformation.rb', line 111
|
Instance Attribute Details
#alpha ⇒ Float?
Specifies the transparency level of the text overlay. Accepts integers from ‘1` to `9`.
11 |
# File 'lib/imagekitio/models/text_overlay_transformation.rb', line 11 optional :alpha, Float |
#background ⇒ String?
Specifies the background color of the text overlay. Accepts an RGB hex code, an RGBA code, or a color name.
18 |
# File 'lib/imagekitio/models/text_overlay_transformation.rb', line 18 optional :background, String |
#flip ⇒ Symbol, ...
Flip the text overlay horizontally, vertically, or both.
24 |
# File 'lib/imagekitio/models/text_overlay_transformation.rb', line 24 optional :flip, enum: -> { Imagekitio::TextOverlayTransformation::Flip } |
#font_color ⇒ String?
Specifies the font color of the overlaid text. Accepts an RGB hex code (e.g., ‘FF0000`), an RGBA code (e.g., `FFAABB50`), or a color name.
31 |
# File 'lib/imagekitio/models/text_overlay_transformation.rb', line 31 optional :font_color, String, api_name: :fontColor |
#font_family ⇒ String?
Specifies the font family of the overlaid text. Choose from the supported fonts list or use a custom font. See [Supported fonts](imagekit.io/docs/add-overlays-on-images#supported-text-font-list) and [Custom font](imagekit.io/docs/add-overlays-on-images#change-font-family-in-text-overlay).
41 |
# File 'lib/imagekitio/models/text_overlay_transformation.rb', line 41 optional :font_family, String, api_name: :fontFamily |
#font_size ⇒ Float, ...
Specifies the font size of the overlaid text. Accepts a numeric value or an arithmetic expression.
48 |
# File 'lib/imagekitio/models/text_overlay_transformation.rb', line 48 optional :font_size, union: -> { Imagekitio::TextOverlayTransformation::FontSize }, api_name: :fontSize |
#inner_alignment ⇒ Symbol, ...
Specifies the inner alignment of the text when width is more than the text length.
55 56 57 |
# File 'lib/imagekitio/models/text_overlay_transformation.rb', line 55 optional :inner_alignment, enum: -> { Imagekitio::TextOverlayTransformation::InnerAlignment }, api_name: :innerAlignment |
#line_height ⇒ Float, ...
Specifies the line height of the text overlay. Accepts integer values representing line height in points. It can also accept [arithmetic expressions](imagekit.io/docs/arithmetic-expressions-in-transformations) such as ‘bw_mul_0.2`, or `bh_div_20`.
66 67 68 |
# File 'lib/imagekitio/models/text_overlay_transformation.rb', line 66 optional :line_height, union: -> { Imagekitio::TextOverlayTransformation::LineHeight }, api_name: :lineHeight |
#padding ⇒ Float, ...
Specifies the padding around the overlaid text. Can be provided as a single positive integer or multiple values separated by underscores (following CSS shorthand order). Arithmetic expressions are also accepted.
76 |
# File 'lib/imagekitio/models/text_overlay_transformation.rb', line 76 optional :padding, union: -> { Imagekitio::TextOverlayTransformation::Padding } |
#radius ⇒ Float, ...
Specifies the corner radius of the text overlay. Set to ‘max` to achieve a circular or oval shape.
83 |
# File 'lib/imagekitio/models/text_overlay_transformation.rb', line 83 optional :radius, union: -> { Imagekitio::TextOverlayTransformation::Radius } |
#rotation ⇒ Float, ...
Specifies the rotation angle of the text overlay. Accepts a numeric value for clockwise rotation or a string prefixed with “N” for counter-clockwise rotation.
90 |
# File 'lib/imagekitio/models/text_overlay_transformation.rb', line 90 optional :rotation, union: -> { Imagekitio::TextOverlayTransformation::Rotation } |
#typography ⇒ String?
Specifies the typography style of the text. Supported values:
-
Single styles: ‘b` (bold), `i` (italic), `strikethrough`.
-
Combinations: Any combination separated by underscores, e.g., ‘b_i`, `b_i_strikethrough`.
100 |
# File 'lib/imagekitio/models/text_overlay_transformation.rb', line 100 optional :typography, String |
#width ⇒ Float, ...
Specifies the maximum width (in pixels) of the overlaid text. The text wraps automatically, and arithmetic expressions (e.g., ‘bw_mul_0.2` or `bh_div_2`) are supported. Useful when used in conjunction with the `background`. Learn about [Arithmetic expressions](imagekit.io/docs/arithmetic-expressions-in-transformations).
109 |
# File 'lib/imagekitio/models/text_overlay_transformation.rb', line 109 optional :width, union: -> { Imagekitio::TextOverlayTransformation::Width } |
Class Method Details
.values ⇒ Array<Symbol>
|
|
# File 'lib/imagekitio/models/text_overlay_transformation.rb', line 152
|
.variants ⇒ Array(Float, String)
|
|
# File 'lib/imagekitio/models/text_overlay_transformation.rb', line 167
|