drawPentagon function
Draw the Pentagon shape marker
Implementation
void drawPentagon(Path path, double x, double y, double width, double height) {
const int eq = 72;
double xValue;
double yValue;
for (int i = 0; i <= 5; i++) {
xValue = width / 2 * math.cos((math.pi / 180) * (i * eq));
yValue = height / 2 * math.sin((math.pi / 180) * (i * eq));
i == 0
? path.moveTo(x + xValue, y + yValue)
: path.lineTo(x + xValue, y + yValue);
}
path.close();
}