# RectSegment Class

> A rectangle path operator.

- Product: Adobe PDF Library 21
- Language: .NET Framework
- Version: APDFL21.0.0PlusP1e
- HTML page: https://docs.datalogics.com/apdfl21/DotNetFramework/APDFL21.0.0PlusP1e/class/RectSegment
- Version index: https://docs.datalogics.com/apdfl21/DotNetFramework/APDFL21.0.0PlusP1e/llms.txt

```csharp
class RectSegment : Segment
```

**Namespace:** `Datalogics::PDFL`

**Inherits from:** [`Segment`](https://docs.datalogics.com/apdfl21/DotNetFramework/APDFL21.0.0PlusP1e/class/Segment.md)

## Description

A rectangle path operator.

RectSegment represents a single path, or line, within a rectangle, with coordinates xy, xy for the beginning and end of the line.

**Uses types:** [`Point`](https://docs.datalogics.com/apdfl21/DotNetFramework/APDFL21.0.0PlusP1e/class/Point.md)

## Constructors

### RectSegment

```csharp
Datalogics.PDFL.RectSegment.RectSegment(double x, double y, double width, double height)
```

*constructor*

**Parameters**

- `x` (`double`): the left edge of the rectangle.
- `y` (`double`): the right edge of the rectangle.
- `width` (`double`): the width of the rectangle.
- `height` (`double`): the height of the rectangle.

Append a rectangle to the current path as a complete subpath, with lower-left corner (x, y) and dimensions width and height in user space.

### RectSegment

```csharp
Datalogics.PDFL.RectSegment.RectSegment(Point point, double width, double height)
```

*constructor*

**Parameters**

- `point` ([`Point`](https://docs.datalogics.com/apdfl21/DotNetFramework/APDFL21.0.0PlusP1e/class/Point.md)): the lower left corner of the rectangle.
- `width` (`double`): the width of the rectangle.
- `height` (`double`): the height of the rectangle.

Append a rectangle to the current path as a complete subpath, with lower-left corner point and dimensions width and height in user space.

## Properties

### Height

```csharp
double Datalogics.PDFL.RectSegment.Height { get; set; }
```

The height of the rectangle.

### Point

```csharp
Point Datalogics.PDFL.RectSegment.Point { get; set; }
```

The lower left corner of the rectangle.

### Width

```csharp
double Datalogics.PDFL.RectSegment.Width { get; set; }
```

The width of the rectangle.

## Methods

### Dispose

```csharp
void Datalogics.PDFL.Segment.Dispose()
```

**Returns:** `void`

### ToString

```csharp
override string Datalogics.PDFL.RectSegment.ToString()
```

**Returns:** `override string`
