getGradientTexture Method

Obtain a texture created from a gradient.

getGradientTexture(_symb: Gradient.Symb, _imodel?: IModelConnection): undefined | RenderTexture

@returns A texture created from the gradient image, or undefined if the texture could not be created.

@note If a texture matching the specified gradient is already cached on the iModel, it will be returned. Otherwise, if an iModel is supplied, the newly-created texture will be cached on the iModel such that subsequent calls with an equivalent gradient and the same iModel will return the cached texture instead of creating a new one.

Parameter Type Description
_symb Gradient.Symb The description of the gradient.
_imodel IModelConnection The IModelConnection with which the texture is associated.

Returns - undefined | RenderTexture

A texture created from the gradient image, or undefined if the texture could not be created.

Defined in

Last Updated: 14 November, 2024