void (final @NotNull Graphics2D g, double @NotNull [] xPoints, double @NotNull [] yPoints, int nPoints, @NotNull StrokeType strokeType, double strokeWidth, @NotNull Object valueAA) { // [tav] todo: mind strokeWidth and strokeType final Path2D path = new Path2D.Double(Path2D.WIND_EVEN_ODD); path.moveTo(xPoints[0], yPoints[0]); for (int p = 1; p < nPoints; p++) { path.lineTo(xPoints[p], yPoints[p]); } path.closePath(); PaintUtil.paintWithAA(g, valueAA, () -> g.fill(path)); }