444546474849505152
this(circle.getCenterX(), circle.getCenterY(), circle.getRadius()); } @Override public void visit(Surface surface) { Context context = surface.getContext(); context.moveTo(x, y); context.arc(x, y, radius, 0, MathHelper.TWO_PI, true); }
4445464748495051
this(circle.getCenterX(), circle.getCenterY(), circle.getRadius()); } @Override public void visit(Surface surface) { Context context = surface.getContext(); context.arc(x, y, radius, 0, MathHelper.TWO_PI, true); }
454647484950515253
this.toY = toY; } @Override public void visit(Surface surface) { Context context = surface.getContext(); context.moveTo(fromX, fromY); context.lineTo(toX, toY); }
470471472473474475476477478479480481
* Represents a custom shape. */ public final class CustomShape extends Shape { @Override public final void draw(Surface surface) { Context context = surface.getContext(); context.beginPath(); for (ShapeVisitor shape : shapes) { shape.visit(surface); } context.closePath(); }
371372373374375376377378379380381382
512513514515516517518519520521522523