# CurveTo Class

> The curveto operator is used to draw a Bezier curve.

- Product: Adobe PDF Library 18
- Language: Java
- Version: APDFL18.0.5PlusP2e
- HTML page: https://docs.datalogics.com/apdfl18/Java/APDFL18.0.5PlusP2e/class/CurveTo
- Version index: https://docs.datalogics.com/apdfl18/Java/APDFL18.0.5PlusP2e/llms.txt

```java
class CurveTo : Segment
```

**Namespace:** `com::datalogics::PDFL`

**Inherits from:** [`Segment`](https://docs.datalogics.com/apdfl18/Java/APDFL18.0.5PlusP2e/class/Segment.md)

## Description

The curveto operator is used to draw a Bezier curve. The curved segment is appended to a path.

The curveto operator calculates the curve between two endpoints, the current (beginning) point and the final (end) point, and in relation to two matching control points.

The control points define the nature of the curve between the two endpoints. These values are represented by a series of x and y coordinates.

**Uses types:** [`Point`](https://docs.datalogics.com/apdfl18/Java/APDFL18.0.5PlusP2e/class/Point.md)

## Constructors

### CurveTo

```java
com.datalogics.PDFL.CurveTo.CurveTo(double x1, double y1, double x2, double y2, double x3, double y3)
```

*constructor*

**Parameters**

- `x1` (`double`): The x-coordinate of the first control point.
- `y1` (`double`): The y-coordinate of the first control point.
- `x2` (`double`): The x-coordinate of the second control point.
- `y2` (`double`): The y-coordinate of the second control point.
- `x3` (`double`): The x-coordinate of the new current point.
- `y3` (`double`): The y-coordinate of the new current point.

Append a cubic Bézier curve to the current path.The curve extends from the current point to the point (x3, y3), using (x1, y1) and (x2, y2) as the Bézier control points.The new current point is (x3 , y3).

### CurveTo

```java
com.datalogics.PDFL.CurveTo.CurveTo(Point point1, Point point2, Point point3)
```

*constructor*

**Parameters**

- `point1` ([`Point`](https://docs.datalogics.com/apdfl18/Java/APDFL18.0.5PlusP2e/class/Point.md)): the first control point.
- `point2` ([`Point`](https://docs.datalogics.com/apdfl18/Java/APDFL18.0.5PlusP2e/class/Point.md)): the second control point.
- `point3` ([`Point`](https://docs.datalogics.com/apdfl18/Java/APDFL18.0.5PlusP2e/class/Point.md)): the new current point.

Append a cubic Bézier curve to the current path.The curve extends from the current point to point3, using point1 and point2 as the Bézier control points.The new current point is point3.

## Methods

### delete

```java
synchronized void com.datalogics.PDFL.CurveTo.delete(Boolean disposing)
```

*protected*

**Parameters**

- `disposing` (`Boolean`)

**Returns:** `synchronized void`

### delete

```java
synchronized void com.datalogics.PDFL.CurveTo.delete()
```

**Returns:** `synchronized void`

### finalize

```java
void com.datalogics.PDFL.CurveTo.finalize()
```

*protected*

**Returns:** `void`

### getPoint1

```java
Point com.datalogics.PDFL.CurveTo.getPoint1()
```

**Returns:** [`Point`](https://docs.datalogics.com/apdfl18/Java/APDFL18.0.5PlusP2e/class/Point.md)

The first control point.

### getPoint2

```java
Point com.datalogics.PDFL.CurveTo.getPoint2()
```

**Returns:** [`Point`](https://docs.datalogics.com/apdfl18/Java/APDFL18.0.5PlusP2e/class/Point.md)

The second control point.

### getPoint3

```java
Point com.datalogics.PDFL.CurveTo.getPoint3()
```

**Returns:** [`Point`](https://docs.datalogics.com/apdfl18/Java/APDFL18.0.5PlusP2e/class/Point.md)

The new current point.

### setPoint1

```java
void com.datalogics.PDFL.CurveTo.setPoint1(Point value)
```

**Parameters**

- `value` ([`Point`](https://docs.datalogics.com/apdfl18/Java/APDFL18.0.5PlusP2e/class/Point.md))

**Returns:** `void`

The first control point.

### setPoint2

```java
void com.datalogics.PDFL.CurveTo.setPoint2(Point value)
```

**Parameters**

- `value` ([`Point`](https://docs.datalogics.com/apdfl18/Java/APDFL18.0.5PlusP2e/class/Point.md))

**Returns:** `void`

The second control point.

### setPoint3

```java
void com.datalogics.PDFL.CurveTo.setPoint3(Point value)
```

**Parameters**

- `value` ([`Point`](https://docs.datalogics.com/apdfl18/Java/APDFL18.0.5PlusP2e/class/Point.md))

**Returns:** `void`

The new current point.

### toString

```java
String com.datalogics.PDFL.CurveTo.toString()
```

**Returns:** `String`
