Previous Document Next Document
NodeRange.Move

Sub Move([DeltaX As Double], [DeltaY As Double], [AnchorIndex As Long = 1], [ElasticMode As Boolean = False])

Member of NodeRange

The Move method repositions all of the nodes in a node range by moving the node by a specified offset.

Parameters
Description
DeltaX
Specifies the horizontal distance to move a node
This parameter is optional, and its default value is 0.
DeltaY
Specifies the vertical distance to move a node
This parameter is optional, and its default value is 0.
AnchorIndex
Specifies the node in the node range that acts as the anchor. The node is identified by its index number.
This parameter is optional, and its default value is 1.
ElasticMode
If set to True, only the node identified by the AnchorIndex parameter is moved by the exact offset specified. The remaining nodes are offset a smaller value depending on their position in the curve. (This is the equivalent of using the Elastic Mode in the CorelDRAW user interface.)
This parameter is optional, and its default value is False.

The following code example creates a node range from all nodes in the curve except for the first and the last nodes. The nodes are then moved up (vertically) by 1" and moved back down by 1" with elastic mode enabled. The middle node (node_count/2) is used in the last operation as the anchor node.

Sub Test() 
 Dim crv As Curve 
 Dim nr As NodeRange 
 Set crv = ActiveShape.Curve 
 Set nr = crv.Nodes.AllExcluding(1, crv.Nodes.Count) 
 nr.Move 0, 1 
 nr.Move 0, -1, nr.Count \ 2, True 
End Sub 

Previous Document Next Document Back to Top

Copyright 2007 Corel Corporation. All rights reserved.