samplingSeed property

  1. @override
  2. @protected
int samplingSeed
override

Returns a seed value used by generateSamples to seed a random number generator to avoid sample aliasing.

Subclasses should override this and provide a custom seed.

The value returned should be the same each time it is called, unless the curve definition changes.

Implementation

@override
@protected
int get samplingSeed {
  _initializeIfNeeded();
  final Offset seedPoint = _cubicSegments[0][1];
  return ((seedPoint.dx + seedPoint.dy) * 10000).round();
}