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

com.cloudinary.transformation.resize.MinimumPad.kt Maven / Gradle / Ivy

package com.cloudinary.transformation.resize

import com.cloudinary.transformation.background.Background
import com.cloudinary.transformation.gravity.CompassGravity

class MinimumPad(
    dimensions: Dimensions,
    relative: Boolean? = null,
    regionRelative: Boolean? = null,
    gravity: CompassGravity? = null,
    offsetX: Any? = null,
    offsetY: Any? = null,
    background: Background? = null
) : BasePad(dimensions, relative, regionRelative, gravity, offsetX, offsetY, background) {
    override val actionType = "mpad"

    class Builder : BasePadBuilder() {
        private var gravity: CompassGravity? = null

        fun gravity(gravity: CompassGravity) = apply { this.gravity = gravity }

        override fun build() = MinimumPad(
            Dimensions(width, height, aspectRatio),
            relative,
            regionRelative,
            gravity,
            offsetX,
            offsetY,
            background
        )
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy