pythagoras.f

## Class Path

• All Implemented Interfaces:
Cloneable, IShape

```public final class Path
extends Object
implements IShape, Cloneable```
Represents a path constructed from lines and curves and which can contain subpaths.
• ### Field Summary

Fields
Modifier and Type Field and Description
`static int` `WIND_EVEN_ODD`
Specifies the even/odd rule for determining the interior of a path.
`static int` `WIND_NON_ZERO`
Specifies the non-zero rule for determining the interior of a path.
• ### Constructor Summary

Constructors
Constructor and Description
`Path()`
`Path(int rule)`
```Path(int rule, int initialCapacity)```
`Path(IShape shape)`
• ### Method Summary

All Methods
Modifier and Type Method and Description
`void` ```append(IShape shape, boolean connect)```
`void` ```append(PathIterator path, boolean connect)```
`Rectangle` `bounds()`
Returns a copy of the bounding rectangle for this shape.
`Rectangle` `bounds(Rectangle target)`
Initializes the supplied rectangle with this shape's bounding rectangle.
`Path` `clone()`
`void` `closePath()`
`boolean` ```contains(float px, float py)```
Returns true if this shape contains the specified point.
`boolean` ```contains(float rx, float ry, float rw, float rh)```
Returns true if this shape completely contains the specified rectangle.
`boolean` `contains(IRectangle r)`
Returns true if this shape completely contains the supplied rectangle.
`boolean` `contains(XY p)`
Returns true if this shape contains the supplied point.
`IShape` `createTransformedShape(Transform t)`
`Point` `currentPoint()`
`void` ```curveTo(float x1, float y1, float x2, float y2, float x3, float y3)```
`boolean` ```intersects(float rx, float ry, float rw, float rh)```
Returns true if this shape intersects the specified rectangle.
`boolean` `intersects(IRectangle r)`
Returns true if this shape intersects the supplied rectangle.
`boolean` `isEmpty()`
Returns true if this shape encloses no area.
`void` ```lineTo(float x, float y)```
`void` ```moveTo(float x, float y)```
`PathIterator` `pathIterator(Transform t)`
Returns an iterator over the path described by this shape.
`PathIterator` ```pathIterator(Transform t, float flatness)```
Returns an iterator over the path described by this shape.
`void` ```quadTo(float x1, float y1, float x2, float y2)```
`void` `reset()`
`void` `setWindingRule(int rule)`
`void` `transform(Transform t)`
`int` `windingRule()`
• ### Methods inherited from class java.lang.Object

`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`
• ### Field Detail

• #### WIND_EVEN_ODD

`public static final int WIND_EVEN_ODD`
Specifies the even/odd rule for determining the interior of a path.
Constant Field Values
• #### WIND_NON_ZERO

`public static final int WIND_NON_ZERO`
Specifies the non-zero rule for determining the interior of a path.
Constant Field Values
• ### Constructor Detail

• #### Path

`public Path()`
• #### Path

`public Path(int rule)`
• #### Path

```public Path(int rule,
int initialCapacity)```
• #### Path

`public Path(IShape shape)`
• ### Method Detail

• #### setWindingRule

`public void setWindingRule(int rule)`
• #### windingRule

`public int windingRule()`
• #### moveTo

```public void moveTo(float x,
float y)```
• #### lineTo

```public void lineTo(float x,
float y)```

```public void quadTo(float x1,
float y1,
float x2,
float y2)```
• #### curveTo

```public void curveTo(float x1,
float y1,
float x2,
float y2,
float x3,
float y3)```
• #### closePath

`public void closePath()`
• #### append

```public void append(IShape shape,
boolean connect)```
• #### append

```public void append(PathIterator path,
boolean connect)```
• #### currentPoint

`public Point currentPoint()`
• #### reset

`public void reset()`
• #### transform

`public void transform(Transform t)`
• #### createTransformedShape

`public IShape createTransformedShape(Transform t)`
• #### bounds

`public Rectangle bounds()`
Description copied from interface: `IShape`
Returns a copy of the bounding rectangle for this shape.
Specified by:
`bounds` in interface `IShape`
• #### bounds

`public Rectangle bounds(Rectangle target)`
Description copied from interface: `IShape`
Initializes the supplied rectangle with this shape's bounding rectangle.
Specified by:
`bounds` in interface `IShape`
Returns:
the supplied rectangle.
• #### isEmpty

`public boolean isEmpty()`
Description copied from interface: `IShape`
Returns true if this shape encloses no area.
Specified by:
`isEmpty` in interface `IShape`
• #### contains

```public boolean contains(float px,
float py)```
Description copied from interface: `IShape`
Returns true if this shape contains the specified point.
Specified by:
`contains` in interface `IShape`
• #### contains

```public boolean contains(float rx,
float ry,
float rw,
float rh)```
Description copied from interface: `IShape`
Returns true if this shape completely contains the specified rectangle.
Specified by:
`contains` in interface `IShape`
• #### intersects

```public boolean intersects(float rx,
float ry,
float rw,
float rh)```
Description copied from interface: `IShape`
Returns true if this shape intersects the specified rectangle.
Specified by:
`intersects` in interface `IShape`
• #### contains

`public boolean contains(XY p)`
Description copied from interface: `IShape`
Returns true if this shape contains the supplied point.
Specified by:
`contains` in interface `IShape`
• #### contains

`public boolean contains(IRectangle r)`
Description copied from interface: `IShape`
Returns true if this shape completely contains the supplied rectangle.
Specified by:
`contains` in interface `IShape`
• #### intersects

`public boolean intersects(IRectangle r)`
Description copied from interface: `IShape`
Returns true if this shape intersects the supplied rectangle.
Specified by:
`intersects` in interface `IShape`
• #### pathIterator

`public PathIterator pathIterator(Transform t)`
Description copied from interface: `IShape`
Returns an iterator over the path described by this shape.
Specified by:
`pathIterator` in interface `IShape`
Parameters:
`t` - if supplied, the points in the path are transformed using this.
• #### pathIterator

```public PathIterator pathIterator(Transform t,
float flatness)```
Description copied from interface: `IShape`
Returns an iterator over the path described by this shape.
Specified by:
`pathIterator` in interface `IShape`
Parameters:
`t` - if supplied, the points in the path are transformed using this.
`flatness` - when approximating curved segments with lines, this controls the maximum distance the lines are allowed to deviate from the approximated curve, thus a higher flatness value generally allows for a path with fewer segments.
• #### clone

`public Path clone()`
Overrides:
`clone` in class `Object`