Package codedraw

Class Path

java.lang.Object
codedraw.Path

public class Path extends Object
Represents a Path that is used to create custom shapes. Use Image.drawPathStartingAt(double, double) and Image.fillPathStartingAt(double, double) to start creating a path. Here is an example on how to draw a section of a dart board.

  double angle = Math.PI / 4; // 45°
  cd.fillPathStartingAt(200, 300)
      .arcTo(300, 300, angle)
      .lineTo(300 - Math.cos(angle) * 200, 300 - Math.sin(angle) * 200)
      .arcTo(300, 300, -angle)
      .complete();