xyz.luan.geometry.Shape Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of geometry Show documentation
Show all versions of geometry Show documentation
Simple geometry package for Java, implementing set operations and area calculation for Polygons.
package xyz.luan.geometry;
import java.util.List;
import javafx.scene.canvas.GraphicsContext;
public interface Shape {
public double area();
public Rectangle getBounds();
public void draw(GraphicsContext g);
public void fill(GraphicsContext g);
public void translate(Point vector);
public Shape intersection(Shape shape);
public List intersections(Line line);
public List sides();
public Shape diff(Shape shape);
public Shape xor(Shape shape);
public Shape union(Shape shape);
}