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

TConicGradientSampler

Samples an angular conic (sweep) color gradient around a center point.

Inheritance:TObject 🞂 TPersistent 🞂 TNotifiablePersistent 🞂 TCustomSampler 🞂 TCustomGradientSampler 🞂 TCustomGradientLookUpTableSampler 🞂 TCustomCenterLutGradientSampler 🞂 TConicGradientSampler

Declaration ​

pascal
TConicGradientSampler = class(TCustomCenterLutGradientSampler)

Description ​

Conical color gradient.

A gradient which goes along the circular arc around a Center. The gradient can be rotated using the Angle property

Mathematics & Algorithm ​

TConicGradientSampler computes color stops based on polar angle θ around center (Xc,Yc):

θ=atan2(Y−Yc,X−Xc)−Angle

The normalized offset u∈[0,1) is determined by mapping θ(mod2π) onto [0,1]:

u=θ(mod2π)2π

See Also ​