fill method

  1. @override
OpSet fill(
  1. List<PointD> points
)
override

Implementation

@override
OpSet fill(List<PointD> points) {
  List<PointD> result = [];
  if (points.length > 2) {
    result = points
        .map((point) => PointD(
              point.x +
                  _config!.drawConfig!.offsetSymmetric(_config!.fillWeight!),
              point.y +
                  _config!.drawConfig!.offsetSymmetric(_config!.fillWeight!),
            ))
        .toList();
    result..add(result.first)..add(result[1])..add(result[2]);
  }
  return OpSet(
      type: OpSetType.fillPath,
      ops: OpsGenerator.curve(result, _config!.drawConfig!));
}