Example usage for java.awt.geom Path2D.Double subclass-usage

List of usage examples for java.awt.geom Path2D.Double subclass-usage

Introduction

In this page you can find the example usage for java.awt.geom Path2D.Double subclass-usage.

Usage

From source file Main.java

class TriangleShape extends Path2D.Double {
    public TriangleShape(Point2D... points) {
        moveTo(points[0].getX(), points[0].getY());
        lineTo(points[1].getX(), points[1].getY());
        lineTo(points[2].getX(), points[2].getY());
        closePath();