LineTo Method

Builds a line segment. Returns an instance of the Shape object, corresponding to the shape where the line has been built.

Applies to: Page object, Shape object

Syntax

[[Set] shapeRet =] object.LineTo ( xEnd, yEnd )

The LineTo method syntax has these parts:

Part Description
object Required. An expression that returns an object in the Applies to list.
xEnd Required. An expression that returns a Double value. The X-coordinate of the end point of the line.
yEnd Required. An expression that returns a Double value. The Y-coordinate of the end point of the line.
shapeRet Optional. A Shape type variable.

Remarks

The line is based on two points: the begin point of the line and the end point of the line.

If object is a page or a group, the LineTo method creates the line in the current Basic shape of the page or group. If the method was called prior to the BeginShape method or after the EndShape method, the LineTo method doesn't create anything and returns Nothing.

If object is a simple shape, the LineTo method creates the line in this shape.

In any case, the begin point of the line is the end point of the last geometry of the shape, in which the segment is being built. To reposition the begin point of the line, use the MoveTo method. The coordinates of the points are in the coordinate system of the shape, group or the page to which object corresponds. The coordinates are measured in internal units (InternalUnit).

 

See Also

ArcTo method, BeginShape method, EndShape method, MoveTo method, SplineStart method, SplineTo method