# MoveTo Class

> An operator that creates a path by moving to a new current position.

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

```java
class MoveTo : Segment
```

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

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

## Description

An operator that creates a path by moving to a new current position. A LineTo operator creates an addition to a path element by moving to the (x,y) coordinates specified in the MoveTo statement. The MoveTo coordinates serve as the new current position, and from here a new path element can start.

For example, the MoveTo coordinates can define the starting position for a LineTo operator. The LineTo operator draws a straight line from the current position (MoveTo) to a new position, the set of (x,y) coordinates defined with the LineTo operator: MoveTo{x:0 y:50} LineTo{x:100 y:100}

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

## Constructors

### MoveTo

```java
com.datalogics.PDFL.MoveTo.MoveTo(double x, double y)
```

*constructor*

**Parameters**

- `x` (`double`): The horizontal coordinate of the new current point.
- `y` (`double`): The vertical coordinate of the new current point.

Move to a new current point specified by coordinates. Begin a new subpath by moving the current point to coordinates x, y, omitting any connecting line segment. If the previous path segment in the current path was also a MoveTo, the new m overrides it; no vestige of the previous MoveTo operation remains in the path.

### MoveTo

```java
com.datalogics.PDFL.MoveTo.MoveTo(Point newCurrentPoint)
```

*constructor*

**Parameters**

- `newCurrentPoint` ([`Point`](https://docs.datalogics.com/apdfl18/Java/APDFL18.0.5PlusP2e/class/Point.md)): The new current point to move to.

Move to a new current point. Begin a new subpath by moving the current point to a new point, omitting any connecting line segment. If the previous path segment in the current path was also a MoveTo, the new m overrides it; no vestige of the previous MoveTo operation remains in the path.

## Methods

### delete

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

*protected*

**Parameters**

- `disposing` (`Boolean`)

**Returns:** `synchronized void`

### delete

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

**Returns:** `synchronized void`

### finalize

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

*protected*

**Returns:** `void`

### getPoint

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

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

The new current point.

### setPoint

```java
void com.datalogics.PDFL.MoveTo.setPoint(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.MoveTo.toString()
```

**Returns:** `String`

A string in the format "[ MoveTo {x, y} ]".

Returns a string representation of this MoveTo segment.
