Class: Imagekitio::Models::SolidColorOverlayTransformation

Inherits:
Internal::Type::BaseModel show all
Defined in:
lib/imagekitio/models/solid_color_overlay_transformation.rb

Defined Under Namespace

Modules: Gradient, Height, Radius, Width

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(alpha: nil, background: nil, gradient: nil, height: nil, radius: nil, width: nil) ⇒ Object

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

Parameters:

  • alpha (Float) (defaults to: nil)

    Specifies the transparency level of the solid color overlay. Accepts integers fr

  • background (String) (defaults to: nil)

    Specifies the background color of the solid color overlay. Accepts an RGB hex co

  • gradient (Boolean, true, String) (defaults to: nil)

    Creates a linear gradient with two colors. Pass ‘true` for a default gradient, o

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

    Controls the height of the solid color overlay. Accepts a numeric value or an ar

  • radius (Float, Symbol, :max) (defaults to: nil)

    Specifies the corner radius of the solid color overlay. Set to ‘max` for circula

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

    Controls the width of the solid color overlay. Accepts a numeric value or an ari



# File 'lib/imagekitio/models/solid_color_overlay_transformation.rb', line 53


Instance Attribute Details

#alphaFloat?

Specifies the transparency level of the solid color overlay. Accepts integers from ‘1` to `9`.

Returns:

  • (Float, nil)


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

optional :alpha, Float

#backgroundString?

Specifies the background color of the solid color overlay. Accepts an RGB hex code (e.g., ‘FF0000`), an RGBA code (e.g., `FFAABB50`), or a color name.

Returns:

  • (String, nil)


18
# File 'lib/imagekitio/models/solid_color_overlay_transformation.rb', line 18

optional :background, String

#gradientBoolean, ...

Creates a linear gradient with two colors. Pass ‘true` for a default gradient, or provide a string for a custom gradient. Only works if the base asset is an image. See [gradient](imagekit.io/docs/effects-and-enhancements#gradient—e-gradient).

Returns:

  • (Boolean, true, String, nil)


27
# File 'lib/imagekitio/models/solid_color_overlay_transformation.rb', line 27

optional :gradient, union: -> { Imagekitio::SolidColorOverlayTransformation::Gradient }

#heightFloat, ...

Controls the height of the solid color overlay. Accepts a numeric value or an arithmetic expression. Learn about [arithmetic expressions](imagekit.io/docs/arithmetic-expressions-in-transformations).

Returns:

  • (Float, String, nil)


35
# File 'lib/imagekitio/models/solid_color_overlay_transformation.rb', line 35

optional :height, union: -> { Imagekitio::SolidColorOverlayTransformation::Height }

#radiusFloat, ...

Specifies the corner radius of the solid color overlay. Set to ‘max` for circular or oval shape. See [radius](imagekit.io/docs/effects-and-enhancements#radius—r).

Returns:

  • (Float, Symbol, :max, nil)


43
# File 'lib/imagekitio/models/solid_color_overlay_transformation.rb', line 43

optional :radius, union: -> { Imagekitio::SolidColorOverlayTransformation::Radius }

#widthFloat, ...

Controls the width of the solid color overlay. Accepts a numeric value or an arithmetic expression (e.g., ‘bw_mul_0.2` or `bh_div_2`). Learn about [arithmetic expressions](imagekit.io/docs/arithmetic-expressions-in-transformations).

Returns:

  • (Float, String, nil)


51
# File 'lib/imagekitio/models/solid_color_overlay_transformation.rb', line 51

optional :width, union: -> { Imagekitio::SolidColorOverlayTransformation::Width }

Class Method Details

.variantsArray(Float, Symbol, :max)

Returns:

  • (Array(Float, Symbol, :max))


# File 'lib/imagekitio/models/solid_color_overlay_transformation.rb', line 82