# RectSegment Class

> A rectangle path operator.

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

```java
class RectSegment : Segment
```

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

**Inherits from:** [`Segment`](https://docs.datalogics.com/apdfl18/Java/APDFL18.0.5PlusP2e/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/apdfl18/Java/APDFL18.0.5PlusP2e/class/Point.md)

## Constructors

### RectSegment

```java
com.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

```java
com.datalogics.PDFL.RectSegment.RectSegment(Point point, double width, double height)
```

*constructor*

**Parameters**

- `point` ([`Point`](https://docs.datalogics.com/apdfl18/Java/APDFL18.0.5PlusP2e/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.

## Methods

### delete

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

*protected*

**Parameters**

- `disposing` (`Boolean`)

**Returns:** `synchronized void`

### delete

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

**Returns:** `synchronized void`

### finalize

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

*protected*

**Returns:** `void`

### getHeight

```java
double com.datalogics.PDFL.RectSegment.getHeight()
```

**Returns:** `double`

The height of the rectangle.

### getPoint

```java
Point com.datalogics.PDFL.RectSegment.getPoint()
```

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

The lower left corner of the rectangle.

### getWidth

```java
double com.datalogics.PDFL.RectSegment.getWidth()
```

**Returns:** `double`

The width of the rectangle.

### setHeight

```java
void com.datalogics.PDFL.RectSegment.setHeight(double value)
```

**Parameters**

- `value` (`double`)

**Returns:** `void`

The height of the rectangle.

### setPoint

```java
void com.datalogics.PDFL.RectSegment.setPoint(Point value)
```

**Parameters**

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

**Returns:** `void`

The lower left corner of the rectangle.

### setWidth

```java
void com.datalogics.PDFL.RectSegment.setWidth(double value)
```

**Parameters**

- `value` (`double`)

**Returns:** `void`

The width of the rectangle.

### toString

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

**Returns:** `String`
