A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://docs.oracle.com/en/java/javase/19/docs/api/java.desktop/java/awt/geom/Path2D.html below:

Path2D (Java SE 19 & JDK 19)

All Implemented Interfaces:
Shape, Cloneable
Direct Known Subclasses:
Path2D.Double, Path2D.Float

The

Path2D

class provides a simple, yet flexible shape which represents an arbitrary geometric path. It can fully represent any path which can be iterated by the

PathIterator

interface including all of its segment types and winding rules and it implements all of the basic hit testing methods of the

Shape

interface.

Use Path2D.Float when dealing with data that can be represented and used with floating point precision. Use Path2D.Double for data that requires the accuracy or range of double precision.

Path2D provides exactly those facilities required for basic construction and management of a geometric path and implementation of the above interfaces with little added interpretation. If it is useful to manipulate the interiors of closed geometric shapes beyond simple hit testing then the Area class provides additional capabilities specifically targeted at closed figures. While both classes nominally implement the Shape interface, they differ in purpose and together they provide two useful views of a geometric shape where Path2D deals primarily with a trajectory formed by path segments and Area deals more with interpretation and manipulation of enclosed regions of 2D geometric space.

The PathIterator interface has more detailed descriptions of the types of segments that make up a path and the winding rules that control how to determine which regions are inside or outside the path.

Since:
1.6

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4