GMImage.AddPathLinetoHorizontalRel
----------------------------------

Draws a horizontal line from the current point (cpx, cpy) to (x, cpy).

| Component | Version | macOS | Windows | Linux | Server | iOS SDK |
|---|---|---|---|---|---|---|
| [GraphicsMagick](component_GraphicsMagick.md) | [4.1](newinversion41.md) | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes |

MBS( "GMImage.AddPathLinetoHorizontalRel"; ImageRef; X ) 

**MBS**( **"GMImage.AddPathLinetoHorizontalRel";** /\* Draws a horizontal line from the current point (cpx, cpy) to (x, cpy). \*/  
**$ImageRef**; /\* The image reference number.e.g. 1 \*/   
**$X**) /\* The new relative x coordinate.e.g. 100 \*/ 

### Parameters

| Parameter | Description | Example |
|---|---|---|
| ImageRef | The image reference number. | 1 |
| X | The new relative x coordinate. | 100 |

### Result

Returns OK or error.

### Description

Draws a horizontal line from the current point (cpx, cpy) to (x, cpy).   
GMImage.AddPathLinetoHorizontalRel indicates that relative coordinates are supplied. At the end of the command, the new current point becomes (x, cpy) for the final value of x.  
### See also

- [GMImage.AddPathLinetoHorizontalAbs](GMImageAddPathLinetoHorizontalAbs.md)
- [GMImage.AddPathLinetoVerticalRel](GMImageAddPathLinetoVerticalRel.md)

This function checks for a license.

Created 18th August 2014 , last changed 18th August 2014

  
[GMImage.AddPathLinetoHorizontalAbs](GMImageAddPathLinetoHorizontalAbs.md) - [GMImage.AddPathLinetoRel](GMImageAddPathLinetoRel.md)

[HTML Version](GMImageAddPathLinetoHorizontalRel.shtml)