org.jetbrains.kotlinx.ggdsl.dsl.freeScales.kt Maven / Gradle / Ivy
package org.jetbrains.kotlinx.ggdsl.dsl
import org.jetbrains.kotlinx.ggdsl.ir.aes.ScalablePositionalAes
import org.jetbrains.kotlinx.ggdsl.ir.scale.FreePositionalScale
import org.jetbrains.kotlinx.ggdsl.ir.scale.PositionalScale
import org.jetbrains.kotlinx.ggdsl.ir.scale.PositionalUnspecifiedScale
import kotlin.reflect.typeOf
/**
* Maps the given scaled source to this positional aesthetic attribute.
*
* @param sourceScaledPositional the mapped source scaled positional.
*/
inline operator fun ScalablePositionalAes.invoke(
scale: PositionalScale
): FreePositionalScale {
val freeScale = FreePositionalScale(
this.name,
scale,
typeOf()
)
context.bindingCollector.freeScales[this.name] = freeScale
return freeScale
}
inline operator fun ScalablePositionalAes.invoke(
scale: PositionalUnspecifiedScale
): FreePositionalScale {
val freeScale = FreePositionalScale(
this.name,
scale,
typeOf()
)
context.bindingCollector.freeScales[this.name] = freeScale
return freeScale
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy