## class HexaPDF::Content::GraphicObject::EndpointArc

Parent Object HexaPDF::Utils::MathHelpers

This class describes an elliptical arc in endpoint parameterization. It allows one to generate an arc from the current point to a given point, similar to Canvas#line_to.

EPSILON

### Attributes

a[R]

Length of semi-major axis

b[R]

Length of semi-minor axis

clockwise[R]

Direction of arc - if `true` in clockwise direction, else in counterclockwise direction

inclination[R]

Inclination in degrees of semi-major axis in respect to x-axis

large_arc[R]

Large arc choice - if `true` use the large arc (i.e. the one spanning more than 180 degrees), else the small arc

x[R]

x-coordinate of endpoint

y[R]

y-coordinate of endpoint

### Public Class Methods

configure(**kwargs)

Creates and configures a new endpoint arc object.

See configure for the allowed keyword arguments.

new()

Creates an endpoint arc with default values x=0, y=0, a=0, b=0, inclination=0, #large_arc=true, clockwise=false (a line to the origin).

### Public Instance Methods

configure(x: nil, y: nil, a: nil, b: nil, inclination: nil, large_arc: nil, clockwise: nil)

Configures the endpoint arc with

• endpoint (`x`, `y`),

• semi-major axis `a`,

• semi-minor axis `b`,

• an inclination in respect to the x-axis of `inclination` degrees,

• the given #large_arc flag and

• the given clockwise flag.

The `large_arc` option determines whether the large arc, i.e. the one spanning more than 180 degrees, is used (`true`) or the small arc (`false`).

The `clockwise` option determines if the arc is drawn in the counterclockwise direction (`false`) or in the clockwise direction (`true`).

Any arguments not specified are not modified and retain their old value, see initialize for the inital values.

Returns self.

draw(canvas)

Draws the arc on the given Canvas.