# CurveToV Class

> A curveto operator where the first control point matches the beginning.

- Product: Adobe PDF Library 21
- Language: Modern C++
- Version: 21.4.0
- HTML page: https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/CurveToV
- Version index: https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/llms.txt

```cpp
class CurveToV : Segment
```

**Namespace:** `datalogics_interface`

**Inherits from:** [`Segment`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/class/Segment.md)

## Description

A curveto operator where the first control point matches the beginning.

The current point is the beginning point in the curve.

The name CurveToV is drawn from the "V" path construction operator.

**Uses types:** [`Point`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/struct/Point.md)

## Constructors

### CurveToV

```cpp
datalogics_interface::CurveToV::CurveToV(const Point &p2, const Point &p3)
```

*constructor*

**Parameters**

- `p2` ([`const Point &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/struct/Point.md)): the second control point.
- `p3` ([`const Point &`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/struct/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 the current point and point2 as the Bézier control points. The new current point is point3.

### CurveToV

```cpp
datalogics_interface::CurveToV::CurveToV(double x2, double y2, double x3, double y3)
```

*constructor*

**Parameters**

- `x2` (`double`): the second control point.
- `y2` (`double`): the new current point.
- `x3` (`double`): the append a cubic Bézier curve to the current path. The curve extends from the current point to point3, using the c...
- `y3` (`double`): the append a cubic Bézier curve to the current path. The curve extends from the current point to point3, using the c...

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

### ~CurveToV

```cpp
datalogics_interface::CurveToV::~CurveToV() override
```

*destructor*

## Methods

### point2

```cpp
Point datalogics_interface::CurveToV::point2() const
```

**Returns:** [`Point`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/struct/Point.md)

The single off-curve control point (current point is reused as the first control point).

### point3

```cpp
Point datalogics_interface::CurveToV::point3() const
```

**Returns:** [`Point`](https://docs.datalogics.com/apdfl21/ModernCPP/21.4.0/struct/Point.md)

The end point of the curve.

### to_string

```cpp
std::string datalogics_interface::CurveToV::to_string() const override
```

**Returns:** `std::string`

Represents a segment, or a single line, within a path.
