Click or drag to resize
Ab4d.SharpEngine logo

TextureFactoryCreateGradientRawImageData(Color3, Color3, Int32, Boolean) Method

Create a RawImageData with data array filled with color gradient between the two specified colors.

Namespace: Ab4d.SharpEngine.Utilities
Assembly: Ab4d.SharpEngine (in Ab4d.SharpEngine.dll) Version: 4.1.9680+a1b1e43de1ad9a7e35472c33948d688d7b40ef79
Syntax
C#
public static RawImageData CreateGradientRawImageData(
	Color3 startColor,
	Color3 endColor,
	int textureSize = 256,
	bool isHorizontal = true
)

Parameters

startColor  Color3
First color of the color gradient.
endColor  Color3
Second color of the color gradient.
textureSize  Int32  (Optional)
Width (when isHorizontal is true) or Height (when isHorizontal is false) of the generated texture.
isHorizontal  Boolean  (Optional)
true to create a horizontal texture (size: textureSize x 1); false to create a vertical texture (size: 1 x textureSize).

Return Value

RawImageData
Generated RawImageData.
See Also