Class TextOverlay.Builder
-
- All Implemented Interfaces:
public final class TextOverlay.BuilderA builder for TextOverlay.
-
-
Method Summary
Modifier and Type Method Description final TextOverlay.BuilderlayerMode(BaseOverlay.LayerMode layerMode)Controls how the layer blends with the base image or underlying content. final TextOverlay.BuilderlayerMode(JsonField<BaseOverlay.LayerMode> layerMode)Sets Builder.layerMode to an arbitrary JSON value. final TextOverlay.Builderposition(OverlayPosition position)Specifies the overlay's position relative to the parent asset. final TextOverlay.Builderposition(JsonField<OverlayPosition> position)Sets Builder.position to an arbitrary JSON value. final TextOverlay.Buildertiming(OverlayTiming timing)Specifies timing information for the overlay (only applicable if the base asset is a video). final TextOverlay.Buildertiming(JsonField<OverlayTiming> timing)Sets Builder.timing to an arbitrary JSON value. final TextOverlay.Buildertext(String text)Specifies the text to be displayed in the overlay. final TextOverlay.Buildertext(JsonField<String> text)Sets Builder.text to an arbitrary JSON value. final TextOverlay.Buildertype(JsonValue type)Sets the field to an arbitrary JSON value. final TextOverlay.Builderencoding(TextOverlay.Encoding encoding)Text can be included in the layer as either i-{input}(plain text) orie-{base64_encoded_input}(base64).final TextOverlay.Builderencoding(JsonField<TextOverlay.Encoding> encoding)Sets Builder.encoding to an arbitrary JSON value. final TextOverlay.Buildertransformation(List<TextOverlayTransformation> transformation)Control styling of the text overlay. final TextOverlay.Buildertransformation(JsonField<List<TextOverlayTransformation>> transformation)Sets Builder.transformation to an arbitrary JSON value. final TextOverlay.BuilderaddTransformation(TextOverlayTransformation transformation)Adds a single TextOverlayTransformation to Builder.transformation. final TextOverlay.BuilderadditionalProperties(Map<String, JsonValue> additionalProperties)final TextOverlay.BuilderputAdditionalProperty(String key, JsonValue value)final TextOverlay.BuilderputAllAdditionalProperties(Map<String, JsonValue> additionalProperties)final TextOverlay.BuilderremoveAdditionalProperty(String key)final TextOverlay.BuilderremoveAllAdditionalProperties(Set<String> keys)final TextOverlaybuild()Returns an immutable instance of TextOverlay. -
-
Method Detail
-
layerMode
final TextOverlay.Builder layerMode(BaseOverlay.LayerMode layerMode)
Controls how the layer blends with the base image or underlying content. Maps to
lmin 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.
-
layerMode
final TextOverlay.Builder layerMode(JsonField<BaseOverlay.LayerMode> layerMode)
Sets Builder.layerMode to an arbitrary JSON value.
You should usually call Builder.layerMode with a well-typed BaseOverlay.LayerMode value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
position
final TextOverlay.Builder position(OverlayPosition position)
Specifies the overlay's position relative to the parent asset. See Position of Layer.
-
position
final TextOverlay.Builder position(JsonField<OverlayPosition> position)
Sets Builder.position to an arbitrary JSON value.
You should usually call Builder.position with a well-typed OverlayPosition value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
timing
final TextOverlay.Builder timing(OverlayTiming timing)
Specifies timing information for the overlay (only applicable if the base asset is a video). See Position of Layer.
-
timing
final TextOverlay.Builder timing(JsonField<OverlayTiming> timing)
Sets Builder.timing to an arbitrary JSON value.
You should usually call Builder.timing with a well-typed OverlayTiming value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
text
final TextOverlay.Builder text(String text)
Specifies the text to be displayed in the overlay. The SDK automatically handles special characters and encoding.
-
text
final TextOverlay.Builder text(JsonField<String> text)
Sets Builder.text to an arbitrary JSON value.
You should usually call Builder.text with a well-typed String value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
type
final TextOverlay.Builder type(JsonValue type)
Sets the field to an arbitrary JSON value.
It is usually unnecessary to call this method because the field defaults to the following:
JsonValue.from("text")This method is primarily for setting the field to an undocumented or not yet supported value.
-
encoding
final TextOverlay.Builder encoding(TextOverlay.Encoding encoding)
Text can be included in the layer as either
i-{input}(plain text) orie-{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 tobase64. To always use plain text (i-{input}), set it toplain.Regardless of the encoding method, the input text is always percent-encoded to ensure it is URL-safe.
-
encoding
final TextOverlay.Builder encoding(JsonField<TextOverlay.Encoding> encoding)
Sets Builder.encoding to an arbitrary JSON value.
You should usually call Builder.encoding with a well-typed Encoding value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
transformation
final TextOverlay.Builder transformation(List<TextOverlayTransformation> transformation)
Control styling of the text overlay. See Text overlays.
-
transformation
final TextOverlay.Builder transformation(JsonField<List<TextOverlayTransformation>> transformation)
Sets Builder.transformation to an arbitrary JSON value.
You should usually call Builder.transformation with a well-typed
List<TextOverlayTransformation>value instead. This method is primarily for setting the field to an undocumented or not yet supported value.
-
addTransformation
final TextOverlay.Builder addTransformation(TextOverlayTransformation transformation)
Adds a single TextOverlayTransformation to Builder.transformation.
-
additionalProperties
final TextOverlay.Builder additionalProperties(Map<String, JsonValue> additionalProperties)
-
putAdditionalProperty
final TextOverlay.Builder putAdditionalProperty(String key, JsonValue value)
-
putAllAdditionalProperties
final TextOverlay.Builder putAllAdditionalProperties(Map<String, JsonValue> additionalProperties)
-
removeAdditionalProperty
final TextOverlay.Builder removeAdditionalProperty(String key)
-
removeAllAdditionalProperties
final TextOverlay.Builder removeAllAdditionalProperties(Set<String> keys)
-
build
final TextOverlay build()
Returns an immutable instance of TextOverlay.
Further updates to this Builder will not mutate the returned instance.
The following fields are required:
.text()
-
-
-
-