Package-level declarations

Types

Link copied to clipboard
sealed class AnimationType : ObjectType
Link copied to clipboard
data class Asset(val id: String, val context: AssetContext?, val label: String? = null, val locale: String? = null, val tags: List<String>? = null, val groups: List<String>? = null, val active: Boolean = false, val meta: Map<String, String>? = null, val payload: AssetPayload = AssetPayload(), val credits: AssetCredits? = null, val license: AssetLicense? = null, val utm: AssetUTM? = null)

Single asset result of a findAssets query.

Link copied to clipboard
interface AssetApi
Link copied to clipboard
data class AssetBooleanProperty(val property: String, val value: Boolean, val defaultValue: Boolean) : AssetProperty

A class that represents a boolean asset property.

Link copied to clipboard
interface AssetColor
Link copied to clipboard
data class AssetColorProperty(val property: String, val value: Color, val defaultValue: Color) : AssetProperty

A class that represents a color asset property.

Link copied to clipboard
data class AssetContext(val sourceId: String)

Context on how an asset was added and shall be used.

Link copied to clipboard
data class AssetCredits(val name: String, val uri: Uri?)

Credits for the creator of the asset.

Link copied to clipboard
data class AssetDefinition(val id: String, val label: Map<String, String>? = null, val tags: Map<String, List<String>>? = null, val groups: List<String>? = null, val meta: Map<String, String>? = null, val payload: AssetPayload = AssetPayload(), val credits: AssetCredits? = null, val license: AssetLicense? = null, val utm: AssetUTM? = null)
Link copied to clipboard
data class AssetDoubleProperty(val property: String, val value: Double, val defaultValue: Double, val min: Double, val max: Double, val step: Double) : AssetProperty

A class that represents a double asset property.

Link copied to clipboard
data class AssetEnumProperty(val property: String, val value: String, val defaultValue: String, val options: List<String>) : AssetProperty

A class that represents an enum asset property.

Link copied to clipboard
data class AssetFloatProperty(val property: String, val value: Float, val defaultValue: Float, val min: Float, val max: Float, val step: Float) : AssetProperty

A class that represents a float asset property.

Link copied to clipboard
data class AssetIntProperty(val property: String, val value: Int, val defaultValue: Int, val min: Int, val max: Int, val step: Int) : AssetProperty

A class that represents an int asset property.

Link copied to clipboard
data class AssetLicense(val name: String, val uri: Uri?)

License for the asset. Overrides the asset source license if present.

Link copied to clipboard
data class AssetPayload(val color: AssetColor? = null, val sourceSet: List<Source>? = null, val typeface: Typeface? = null, val transformPreset: AssetTransformPreset? = null, val properties: List<AssetProperty>? = null, val stylePreset: String? = null)

Structured information about the contained asset.

Link copied to clipboard
interface AssetProperty

A class that represents an asset property.

Link copied to clipboard
abstract class AssetSource(val sourceId: String)
Link copied to clipboard
data class AssetStringProperty(val property: String, val value: String, val defaultValue: String) : AssetProperty

A class that represents a string asset property.

Link copied to clipboard

A sealed interface that represents a transform preset.

Link copied to clipboard
data class AssetUTM(val source: String?, val medium: String?)

UTM parameters for the links inside the credits.

Link copied to clipboard
Link copied to clipboard
data class AudioFromVideoOptions(val keepTrimSettings: Boolean = true, val muteOriginalVideo: Boolean = false)
Link copied to clipboard
class AudioThumbnailResult(val chunkIndex: Int, val samples: List<Float>)
Link copied to clipboard
data class AudioTrackInfo(val audioCodec: String, val channels: Int, val sampleRate: Int, val audioDuration: Double, val numAudioPackets: Int, val numAudioFrames: Long, val trackName: String, val trackIndex: Int, val language: String)

Information about a single audio track from a video. This data class provides comprehensive metadata about audio tracks, including codec information, technical specifications, and track details.

Link copied to clipboard
Link copied to clipboard
interface BlockApi
Link copied to clipboard
interface BlockState
Link copied to clipboard
sealed class BlurType : ObjectType
Link copied to clipboard
Link copied to clipboard
data class CharacterInkBox(val x: Float, val y: Float, val width: Float, val height: Float, val baselineY: Float)

Tight ink-paint bounding box of a single grapheme, in global scene coordinates.

Link copied to clipboard
data class CMYKColor : Color
Link copied to clipboard
interface Color
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
data class CompressionOptions(val format: CompressionFormat = CompressionFormat.ZSTD, val level: CompressionLevel = CompressionLevel.DEFAULT)

Compression options for scene serialization.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
typealias DesignBlock = Int
Link copied to clipboard
data class DesignBlockEvent(val block: DesignBlock, val type: DesignBlockEvent.Type)
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
data class DominantColor(val r: Float, val g: Float, val b: Float, val weight: Float)

A single color extracted from the rendered appearance of a block.

Link copied to clipboard
data class DominantColorsOptions(val count: Int = 5, val ignoreWhite: Boolean = false)
Link copied to clipboard
interface EditorApi
Link copied to clipboard
sealed class EffectType : ObjectType
Link copied to clipboard
Link copied to clipboard

Every stable catalog error code as a typed constant. Branch on EngineException.code against these instead of bare strings:

Link copied to clipboard
open class EngineException(message: String, val code: String = "", val category: String = "", val hint: String = "", docs: String = "", val args: Map<String, Any> = emptyMap(), val silent: Boolean = false) : RuntimeException

Structured engine error surfaced from the native side.

Link copied to clipboard
interface EventApi
Link copied to clipboard
data class ExportOptions(val pngCompressionLevel: Int = 5, val jpegQuality: Float = 0.9f, val webpQuality: Float = 1.0f, val targetWidth: Float? = null, val targetHeight: Float? = null, val exportPdfWithHighCompatibility: Boolean = true, val exportPdfWithUnderlayer: Boolean = false, val underlayerSpotColorName: String = "", val underlayerOffset: Float = 0.0f, val underlayerRenderRatio: Float = 1.0f, val underlayerMaxError: Float = 2.0f, val allowTextOverhang: Boolean = false)

The export options.

Link copied to clipboard
data class ExportVideoOptions(val h264Profile: Int = 77, val h264Level: Int = 52, val videoBitrate: Int = 0, val audioBitrate: Int = 0, val frameRate: Float = 30.0f, val targetWidth: Float? = null, val targetHeight: Float? = null, val allowTextOverhang: Boolean = false)
Link copied to clipboard
data class ExportVideoProgress(val renderedFrames: Int, val encodedFrames: Int, val totalFrames: Int)
Link copied to clipboard
data class FetchAssetOptions(val locale: String? = null)

Options for fetching an asset.

Link copied to clipboard

Fill rule for resolving self-intersecting or overlapping subpaths of a vector path shape. Use with the shape/vector_path/fillRule enum property.

Link copied to clipboard
sealed class FillType : ObjectType
Link copied to clipboard
data class FindAssetsQuery(val perPage: Int, val page: Int, val query: String? = null, val locale: String? = null, val sortingOrder: SortingOrder = SortingOrder.NONE, val sortKey: String? = null, val sortActiveFirst: Boolean = false, val tags: List<String>? = null, val groups: List<String>? = null, val excludeGroups: List<String>? = null)

Search parameters for find asset query.

Link copied to clipboard
data class FindAssetsResult(val assets: List<Asset>, val currentPage: Int, val nextPage: Int = -1, val total: Int)

Return type of a findAssets query.

Link copied to clipboard
data class Font(val uri: Uri, val subFamily: String, val weight: FontWeight, val style: FontStyle)
Link copied to clipboard
data class FontMetrics(val ascender: Float, val descender: Float, val unitsPerEm: Float, val lineGap: Float, val capHeight: Float, val xHeight: Float, val underlineOffset: Float, val underlineSize: Float, val strikeoutOffset: Float, val strikeoutSize: Float)

Font metrics extracted from a font file. Values are in the font's design units coordinate space.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
data class GradientColorStop(@FloatRange(from = 0.0, to = 1.0) val stop: Float, val color: Color)
Link copied to clipboard

When a transform handle is shown: by the default rules, always (including while editing text), or never. always does not apply in crop edit mode, which has its own handles.

Link copied to clipboard
typealias History = Int
Link copied to clipboard

Describes the kind of update that triggered an EditorApi.onHistoryUpdatedWithKind event.

Link copied to clipboard

Horizontal alignment of the content fill inside the block.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
data class MovementConstraintRule(val overshoot: Float, val scope: MovementConstraintScope = MovementConstraintScope.Scene)

A movement constraint rule. The scope determines which blocks the rule applies to; overshoot is a non-negative fraction of the moved block's own size.

Link copied to clipboard

Identifies which blocks a movement constraint rule applies to.

Link copied to clipboard
sealed class ObjectType
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
data class ResolvedMovementConstraint(val overshoot: Float)

The effective movement constraint for a block, returned by EditorApi.getMovementConstraint. null is returned when the block is unconstrained.

Link copied to clipboard
data class RGBAColor : Color
Link copied to clipboard
data class SaveToStringOptions(val allowedResourceSchemes: List<String> = listOf("blob", "bundle", "file", "http", "https"), val compression: CompressionOptions? = null)

Options for saving a scene to string.

Link copied to clipboard
interface SceneApi
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
interface Setting
Link copied to clipboard
sealed class ShapeType : ObjectType
Link copied to clipboard
Link copied to clipboard

The order to sort by if the asset source supports sorting. If set to None, the order is the same as the assets were added to the source.

Link copied to clipboard
data class Source(val uri: Uri, val width: Int, val height: Int)
Link copied to clipboard
data class SplitOptions(val attachToParent: Boolean = true, val createParentTrackIfNeeded: Boolean = false, val selectNewBlock: Boolean = true)
Link copied to clipboard
data class SpotColor : Color
Link copied to clipboard

Controls how the ends of open stroked paths (such as line shapes) are rendered.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
typealias Subscription = Int
Link copied to clipboard
Link copied to clipboard
data class TextDecorationConfig(val lines: Set<TextDecorationLine> = setOf(TextDecorationLine.NONE), val style: TextDecorationStyle = TextDecorationStyle.SOLID, val underlineColor: Color? = null, val underlineThickness: Float = 1.0f, val underlineOffset: Float = 0.0f, val skipInk: Boolean = true)

Configuration for text decorations on a text range.

Link copied to clipboard

Represents a type of text decoration line.

Link copied to clipboard

Represents the visual style of a text decoration line.

Link copied to clipboard
data class TextRunInfo(val from: Int, val to: Int, val text: String, val color: Color, val fontWeight: FontWeight, val fontStyle: FontStyle, val fontSize: Float, val textCase: TextCase, val typeface: Typeface, val resolvedFontFileUri: String, val textDecoration: TextDecorationConfig, val kerning: Float)

Represents a single contiguous text run with uniform formatting.

Link copied to clipboard
data class Typeface(val name: String, val fonts: List<Font>)
Link copied to clipboard
class UriResolverAsync(resolver: suspend (Uri) -> Uri)

Internal helper class used by EditorApi.setUriResolverAsync.

Link copied to clipboard
interface VariableApi
Link copied to clipboard

Vertical alignment of the content fill inside the block.

Link copied to clipboard
class VideoThumbnailResult(val frameIndex: Int, val width: Int, val height: Int, val imageData: ByteBuffer)
Link copied to clipboard

Properties

Link copied to clipboard

The default base URI for loading CE.SDK asset definitions from the IMG.LY CDN.

Link copied to clipboard

Returns the base uri of the default asset sources that was previously passed to addDefaultAssetSources.

Functions

Link copied to clipboard
suspend fun Engine.addDefaultAssetSources(baseUri: Uri = Engine.assetBaseUri, exclude: Set<DefaultAssetSource> = emptySet()): Job

Convenience function that registers a set of asset sources containing our example assets. Note: See DefaultAssetSource enum for available values. Note: By default, these assets are parsed from the IMG.LY CDN at https://cdn.img.ly/packages/imgly/cesdk-android/<version>/assets/<id>/content.json.

Link copied to clipboard
suspend fun Engine.addDemoAssetSources(exclude: Set<DemoAssetSource> = emptySet(), withUploadAssetSources: Boolean = false, baseUri: Uri = Engine.assetBaseUri)

Convenience function that registers a set of demo asset sources containing our example assets. Note: See DemoAssetSource enum for available values. Note: By default, these assets are parsed from the IMG.LY CDN at https://cdn.img.ly/packages/imgly/cesdk-android/<version>/assets/<id>/content.json.

Link copied to clipboard

Returns all the keypath-value setting pairs of the Engine. Useful when copying settings between Engine instances (see importSettings).

Link copied to clipboard

Get when the standalone move handle is shown for the selected block.

Link copied to clipboard

Get when the edge (resize) handles are shown for the selected block.

Link copied to clipboard

Get when the rotation handle is shown for the selected block.

Link copied to clipboard

Get when the corner (scale) handles are shown for the selected block.

Link copied to clipboard

Sets all the keypath-value setting pairs to the Engine. Useful when copying settings between Engine instances (see exportSettings).

Link copied to clipboard
suspend fun Engine.populateAssetSource(id: String, jsonUri: Uri, replaceBaseUri: Uri? = null)

Creates and adds a new local asset source with id. A describing content json file is fetched from jsonUri and containing assets are added to the local asset source. Note: Check "https://cdn.img.ly/packages/imgly/cesdk-android/1.78.0/assets/ly.img.sticker/content.json" for the structure of the json file.

Link copied to clipboard

Set when the standalone move handle is shown for the selected block.

Link copied to clipboard

Set when the edge (resize) handles are shown for the selected block.

Link copied to clipboard

Set when the rotation handle is shown for the selected block.

Link copied to clipboard

Set when the corner (scale) handles are shown for the selected block.