Skip to content
Member Filters
Show Inherited
Show Protected
Show abstract
GR32_ColorGradients🞂TXYSqrtGradientSamplerClass

TXYSqrtGradientSampler

Square-root product gradient sampler.

Inheritance:TObject 🞂 TPersistent 🞂 TNotifiablePersistent 🞂 TCustomSampler 🞂 TCustomGradientSampler 🞂 TCustomGradientLookUpTableSampler 🞂 TCustomCenterLutGradientSampler 🞂 TCustomCenterRadiusLutGradientSampler 🞂 TCustomCenterRadiusAngleLutGradientSampler 🞂 TXYSqrtGradientSampler

Declaration ​

pascal
TXYSqrtGradientSampler = class(TCustomCenterRadiusAngleLutGradientSampler)

Description ​

TXYSqrtGradientSampler samples a square-root product gradient defined by the square root of the multiplication of the X and Y coordinate values.

It is related to the XY color gradient, but mapped using the square root, resulting in more evenly spaced colors.

Its size can be controlled using the Radius property, which is actually some sort of an incircle radius. The center can be set using the Center property. Finally, the gradient can be rotated using the Angle property.

ClampMirrorRepeat

Mathematics & Algorithm ​

Given local rotated offset coordinates (X′,Y′) relative to center (Xc,Yc):

u=|X′⋅Y′|R