getGradientTexture Method

Obtain a texture created from a gradient.

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

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 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: 30 November, 2023