TBarycentricGradientSampler.IsPointInTriangle

function IsPointInTriangle(X, Y: TFloat): Boolean;

function IsPointInTriangle(Point: TFloatPoint): Boolean;

Description

Check whether the given coordinates are within the triangle defined by the three color points. The function uses the barycentric coordinates and thus may only be called after the coordinations have been transformed in the PrepareSampling procedure. In this case a call will be typically pretty fast, otherwise, the output is undefined.

See Also

PrepareSampling