# ClosePathSegment Class

> An operator that completes a vector shape, drawing a line from the first point to the last point.

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

```cpp
class ClosePathSegment : Segment
```

**Namespace:** `datalogics_interface`

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

## Description

An operator that completes a vector shape, drawing a line from the first point to the last point.

A path is a series of commands that define the boundary of a vector shape. The ClosePath command draws a line from the current location back to its starting point, effectively closing a box or parabolic shape on a page.

## Constructors

### ClosePathSegment

```cpp
datalogics_interface::ClosePathSegment::ClosePathSegment()
```

*constructor*

Construct a close-path segment.

### ~ClosePathSegment

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

*destructor*

## Methods

### to_string

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

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

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