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

TVoronoiMetric

Defines the distance calculation metric used by Voronoi cell gradient samplers.

Declaration ​

pascal
TVoronoiMetric = (vmEuclidean, vmManhattan, vmCustom);
TVoronoiMetricFunc = function (X, Y: TFloat; Point: TFloatPoint): TFloat;

Description ​

TVoronoiMetric specifies the mathematical metric used by TVoronoiSampler to determine the distance between a sampling point (X,Y) and feature site points in a Voronoi diagram.

Enumeration Values ​

ValueDescription
vmEuclideanCalculates standard straight-line distance d=(X−Px)2+(Y−Py)2.
vmManhattanCalculates taxicab distance d=|X−Px|+|Y−Py|.
vmCustomUses a user-provided custom metric delegate function (TVoronoiMetricFunc).

Procedural Delegate ​

TVoronoiMetricFunc allows custom distance metric functions to be passed to TVoronoiSampler.

See Also ​