![JAR search and dependency download from the Maven repository](/logo.png)
godot.gen.godot.GradientTexture1D.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of godot-library-debug Show documentation
Show all versions of godot-library-debug Show documentation
Contains godot api as kotlin classes and jvm cpp interaction code.
The newest version!
// THIS FILE IS GENERATED! DO NOT EDIT IT MANUALLY!
@file:Suppress("PackageDirectoryMismatch", "unused", "FunctionName", "RedundantModalityModifier",
"UNCHECKED_CAST", "JoinDeclarationAndAssignment", "USELESS_CAST",
"RemoveRedundantQualifierName", "NOTHING_TO_INLINE", "NON_FINAL_MEMBER_IN_OBJECT",
"RedundantVisibilityModifier", "RedundantUnitReturnType", "MemberVisibilityCanBePrivate")
package godot
import godot.`annotation`.GodotBaseType
import godot.core.TypeManager
import godot.core.VariantParser.BOOL
import godot.core.VariantParser.LONG
import godot.core.VariantParser.NIL
import godot.core.VariantParser.OBJECT
import godot.core.memory.TransferContext
import godot.util.VoidPtr
import kotlin.Boolean
import kotlin.Int
import kotlin.Suppress
import kotlin.Unit
import kotlin.jvm.JvmName
/**
* A 1D texture that obtains colors from a [Gradient] to fill the texture data. The texture is
* filled by sampling the gradient for each pixel. Therefore, the texture does not necessarily
* represent an exact copy of the gradient, as it may miss some colors if there are not enough pixels.
* See also [GradientTexture2D], [CurveTexture] and [CurveXYZTexture].
*/
@GodotBaseType
public open class GradientTexture1D : Texture2D() {
/**
* The [Gradient] used to fill the texture.
*/
public final inline var gradient: Gradient?
@JvmName("gradientProperty")
get() = getGradient()
@JvmName("gradientProperty")
set(`value`) {
setGradient(value)
}
/**
* The number of color samples that will be obtained from the [Gradient].
*/
public final inline var width: Int
@JvmName("widthProperty")
get() = getWidth()
@JvmName("widthProperty")
set(`value`) {
setWidth(value)
}
/**
* If `true`, the generated texture will support high dynamic range ([Image.FORMAT_RGBAF] format).
* This allows for glow effects to work if [Environment.glowEnabled] is `true`. If `false`, the
* generated texture will use low dynamic range; overbright colors will be clamped
* ([Image.FORMAT_RGBA8] format).
*/
public final inline var useHdr: Boolean
@JvmName("useHdrProperty")
get() = isUsingHdr()
@JvmName("useHdrProperty")
set(`value`) {
setUseHdr(value)
}
public override fun new(scriptIndex: Int): Unit {
callConstructor(ENGINECLASS_GRADIENTTEXTURE1D, scriptIndex)
}
public final fun setGradient(gradient: Gradient?): Unit {
TransferContext.writeArguments(OBJECT to gradient)
TransferContext.callMethod(rawPtr, MethodBindings.setGradientPtr, NIL)
}
public final fun getGradient(): Gradient? {
TransferContext.writeArguments()
TransferContext.callMethod(rawPtr, MethodBindings.getGradientPtr, OBJECT)
return (TransferContext.readReturnValue(OBJECT) as Gradient?)
}
public final fun setWidth(width: Int): Unit {
TransferContext.writeArguments(LONG to width.toLong())
TransferContext.callMethod(rawPtr, MethodBindings.setWidthPtr, NIL)
}
public final fun setUseHdr(enabled: Boolean): Unit {
TransferContext.writeArguments(BOOL to enabled)
TransferContext.callMethod(rawPtr, MethodBindings.setUseHdrPtr, NIL)
}
public final fun isUsingHdr(): Boolean {
TransferContext.writeArguments()
TransferContext.callMethod(rawPtr, MethodBindings.isUsingHdrPtr, BOOL)
return (TransferContext.readReturnValue(BOOL) as Boolean)
}
public companion object
internal object MethodBindings {
public val setGradientPtr: VoidPtr =
TypeManager.getMethodBindPtr("GradientTexture1D", "set_gradient", 2756054477)
public val getGradientPtr: VoidPtr =
TypeManager.getMethodBindPtr("GradientTexture1D", "get_gradient", 132272999)
public val setWidthPtr: VoidPtr =
TypeManager.getMethodBindPtr("GradientTexture1D", "set_width", 1286410249)
public val setUseHdrPtr: VoidPtr =
TypeManager.getMethodBindPtr("GradientTexture1D", "set_use_hdr", 2586408642)
public val isUsingHdrPtr: VoidPtr =
TypeManager.getMethodBindPtr("GradientTexture1D", "is_using_hdr", 36873697)
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy