pythagoras.d

## Class Arc

• ### Field Summary

Fields
Modifier and Type Field and Description
`double` `extent`
The angular extent of this arc.
`double` `height`
The height of this arc's framing rectangle.
`double` `start`
The starting angle of this arc.
`double` `width`
The width of this arc's framing rectangle.
`double` `x`
The x-coordinate of this arc's framing rectangle.
`double` `y`
The y-coordinate of this arc's framing rectangle.
• ### Fields inherited from interface pythagoras.d.IArc

`CHORD, OPEN, PIE`
• ### Constructor Summary

Constructors
Constructor and Description
`Arc()`
Creates an open arc with frame (0x0+0+0) and zero angles.
```Arc(double x, double y, double width, double height, double start, double extent, int type)```
Creates an arc of the specified type with the specified framing rectangle, starting angle and angular extent.
`Arc(int type)`
Creates an arc of the specified type with frame (0x0+0+0) and zero angles.
```Arc(IRectangle bounds, double start, double extent, int type)```
Creates an arc of the specified type with the supplied framing rectangle, starting angle and angular extent.
• ### Method Summary

All Methods
Modifier and Type Method and Description
`double` `angleExtent()`
Returns the angular extent of this arc.
`double` `angleStart()`
Returns the starting angle of this arc.
`int` `arcType()`
Returns the type of this arc: `IArc.OPEN`, etc.
`double` `height()`
Returns the height of the framing rectangle.
`void` `setAngleExtent(double extent)`
Sets the angular extent of this arc to the specified value.
`void` ```setAngles(double x1, double y1, double x2, double y2)```
Sets the starting angle and angular extent of this arc using two sets of coordinates.
`void` ```setAngles(XY p1, XY p2)```
Sets the starting angle and angular extent of this arc using two sets of coordinates.
`void` `setAngleStart(double start)`
Sets the starting angle of this arc to the specified value.
`void` `setAngleStart(XY point)`
Sets the starting angle of this arc to the angle defined by the supplied point relative to the center of this arc.
`void` ```setArc(double x, double y, double width, double height, double start, double extent, int type)```
Sets the location, size, angular extents, and closure type of this arc to the specified values.
`void` `setArc(IArc arc)`
Sets the location, size, angular extents, and closure type of this arc to the same values as the supplied arc.
`void` ```setArc(IRectangle rect, double start, double extent, int type)```
Sets the location, size, angular extents, and closure type of this arc to the specified values.
`void` ```setArc(XY point, IDimension size, double start, double extent, int type)```
Sets the location, size, angular extents, and closure type of this arc to the specified values.
`void` ```setArcByCenter(double x, double y, double radius, double start, double extent, int type)```
Sets the location, size, angular extents, and closure type of this arc based on the specified values.
`void` ```setArcByTangent(XY p1, XY p2, XY p3, double radius)```
Sets the location, size, angular extents, and closure type of this arc based on the specified values.
`void` `setArcType(int type)`
Sets the type of this arc to the specified value.
`void` ```setFrame(double x, double y, double width, double height)```
Sets the location and size of the framing rectangle of this shape to the specified values.
`double` `width()`
Returns the width of the framing rectangle.
`double` `x()`
Returns the x-coordinate of the upper-left corner of the framing rectangle.
`double` `y()`
Returns the y-coordinate of the upper-left corner of the framing rectangle.
• ### Methods inherited from class pythagoras.d.AbstractArc

`bounds, clone, contains, contains, containsAngle, endPoint, endPoint, intersects, isEmpty, pathIterator, startPoint, startPoint`
• ### Methods inherited from class pythagoras.d.RectangularShape

`bounds, center, centerX, centerY, contains, contains, frame, frame, intersects, max, maxX, maxY, min, minX, minY, pathIterator, setFrame, setFrame, setFrameFromCenter, setFrameFromCenter, setFrameFromDiagonal, setFrameFromDiagonal`
• ### Methods inherited from class java.lang.Object

`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`
• ### Methods inherited from interface pythagoras.d.IRectangularShape

`center, centerX, centerY, frame, frame, max, maxX, maxY, min, minX, minY`
• ### Methods inherited from interface pythagoras.d.IShape

`bounds, contains, contains, intersects, pathIterator`
• ### Field Detail

• #### x

`public double x`
The x-coordinate of this arc's framing rectangle.
• #### y

`public double y`
The y-coordinate of this arc's framing rectangle.
• #### width

`public double width`
The width of this arc's framing rectangle.
• #### height

`public double height`
The height of this arc's framing rectangle.
• #### start

`public double start`
The starting angle of this arc.
• #### extent

`public double extent`
The angular extent of this arc.
• ### Constructor Detail

• #### Arc

`public Arc()`
Creates an open arc with frame (0x0+0+0) and zero angles.
• #### Arc

`public Arc(int type)`
Creates an arc of the specified type with frame (0x0+0+0) and zero angles.
• #### Arc

```public Arc(double x,
double y,
double width,
double height,
double start,
double extent,
int type)```
Creates an arc of the specified type with the specified framing rectangle, starting angle and angular extent.
• #### Arc

```public Arc(IRectangle bounds,
double start,
double extent,
int type)```
Creates an arc of the specified type with the supplied framing rectangle, starting angle and angular extent.
• ### Method Detail

• #### arcType

`public int arcType()`
Description copied from interface: `IArc`
Returns the type of this arc: `IArc.OPEN`, etc.
Specified by:
`arcType` in interface `IArc`
• #### x

`public double x()`
Description copied from interface: `IRectangularShape`
Returns the x-coordinate of the upper-left corner of the framing rectangle.
Specified by:
`x` in interface `IRectangularShape`
• #### y

`public double y()`
Description copied from interface: `IRectangularShape`
Returns the y-coordinate of the upper-left corner of the framing rectangle.
Specified by:
`y` in interface `IRectangularShape`
• #### width

`public double width()`
Description copied from interface: `IRectangularShape`
Returns the width of the framing rectangle.
Specified by:
`width` in interface `IRectangularShape`
• #### height

`public double height()`
Description copied from interface: `IRectangularShape`
Returns the height of the framing rectangle.
Specified by:
`height` in interface `IRectangularShape`
• #### angleStart

`public double angleStart()`
Description copied from interface: `IArc`
Returns the starting angle of this arc.
Specified by:
`angleStart` in interface `IArc`
• #### angleExtent

`public double angleExtent()`
Description copied from interface: `IArc`
Returns the angular extent of this arc.
Specified by:
`angleExtent` in interface `IArc`
• #### setArcType

`public void setArcType(int type)`
Sets the type of this arc to the specified value.
• #### setAngleStart

`public void setAngleStart(double start)`
Sets the starting angle of this arc to the specified value.
• #### setAngleExtent

`public void setAngleExtent(double extent)`
Sets the angular extent of this arc to the specified value.
• #### setArc

```public void setArc(double x,
double y,
double width,
double height,
double start,
double extent,
int type)```
Sets the location, size, angular extents, and closure type of this arc to the specified values.
• #### setArc

```public void setArc(XY point,
IDimension size,
double start,
double extent,
int type)```
Sets the location, size, angular extents, and closure type of this arc to the specified values.
• #### setArc

```public void setArc(IRectangle rect,
double start,
double extent,
int type)```
Sets the location, size, angular extents, and closure type of this arc to the specified values.
• #### setArc

`public void setArc(IArc arc)`
Sets the location, size, angular extents, and closure type of this arc to the same values as the supplied arc.
• #### setArcByCenter

```public void setArcByCenter(double x,
double y,
double start,
double extent,
int type)```
Sets the location, size, angular extents, and closure type of this arc based on the specified values.
• #### setArcByTangent

```public void setArcByTangent(XY p1,
XY p2,
XY p3,
Sets the location, size, angular extents, and closure type of this arc based on the specified values.
• #### setAngleStart

`public void setAngleStart(XY point)`
Sets the starting angle of this arc to the angle defined by the supplied point relative to the center of this arc.
• #### setAngles

```public void setAngles(double x1,
double y1,
double x2,
double y2)```
Sets the starting angle and angular extent of this arc using two sets of coordinates. The first set of coordinates is used to determine the angle of the starting point relative to the arc's center. The second set of coordinates is used to determine the angle of the end point relative to the arc's center. The arc will always be non-empty and extend counterclockwise from the first point around to the second point.
• #### setAngles

```public void setAngles(XY p1,
XY p2)```
Sets the starting angle and angular extent of this arc using two sets of coordinates. The first set of coordinates is used to determine the angle of the starting point relative to the arc's center. The second set of coordinates is used to determine the angle of the end point relative to the arc's center. The arc will always be non-empty and extend counterclockwise from the first point around to the second point.
• #### setFrame

```public void setFrame(double x,
double y,
double width,
double height)```
Description copied from class: `RectangularShape`
Sets the location and size of the framing rectangle of this shape to the specified values.
Specified by:
`setFrame` in class `RectangularShape`