/**
* Draws directly onto the surface using {@link DirectShapeRenderer}.
*/
private void drawDirectly(Surface surface) {
DirectShapeRenderer shapeRenderer = new DirectShapeRenderer(surface);
shapeRenderer.beginPath()
.drawLineSegment(40, 20, 180, 20)
.drawQuadraticCurveTo(200, 20, 200, 40)
.drawLineTo(200, 180)
.drawQuadraticCurveTo(200, 200, 180, 200)
.drawLineTo(40, 200)
.drawQuadraticCurveTo(20, 200, 20, 180)
.drawLineTo(20, 40)
.drawQuadraticCurveTo(20, 20, 40, 20)
.moveTo(50, 50)
.drawArc(50, 50, 15, (float) Math.toRadians(30), (float) Math.toRadians(-30), false)
.closePath()
.stroke();
shapeRenderer.beginPath()
.drawEllipse(20, 100, 180, 100)
.closePath()
.stroke();
shapeRenderer.beginPath();
for (int i = 0; i < 8; i++) {
shapeRenderer.drawCircle(80 + i * 12, 50, 1);
}
shapeRenderer.closePath().fill();
}