All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.cloudinary.transformation.layer.position.BaseLayerPosition.kt Maven / Gradle / Ivy

package com.cloudinary.transformation.layer.position

import com.cloudinary.transformation.Param
import com.cloudinary.transformation.gravity.Gravity

abstract class BaseLayerPosition internal constructor(
    protected val offsetX: Any? = null,
    protected val offsetY: Any? = null,
    protected val gravity: Gravity? = null
) {
    internal open fun asParams(): List {
        return mutableListOf().apply {
            if (gravity != null) add(Param("g", gravity))
            if (offsetX != null) add(Param("x", offsetX))
            if (offsetY != null) add(Param("y", offsetY))
        }
    }
}





© 2015 - 2024 Weber Informatics LLC | Privacy Policy