Previous Document Next Document

Object Model Reference : Classes : N : Node : Methods : Node.Move


Node.Move

Sub Move([DeltaX As Double], [DeltaY As Double])

Description

Member of Node

The Move method offsets the position of a node relative to its original location.

Parameter
Description
DeltaX
Specifies the horizontal offset. This parameter is optional, and its default value is 0.
DeltaY
Specifies the vertical offset. This parameter is optional, and its default value is 0.

VBA example

The following VBA example randomly distorts the selected curve. This macro loops through all nodes and changes their positions by moving each one by a random offset.

Sub Test()
 Dim s As Shape
 Dim n As Node
 Dim dx As Double, dy As Double
 Const Amplitude As Double = 0.5
 Set s = ActiveShape
 If s.Type = cdrCurveShape Then
  For Each n In s.Curve.Nodes
   dx = (Rnd() - 0.5) * Amplitude
   dy = (Rnd() - 0.5) * Amplitude
   n.Move dx, dy
  Next n
 End If
End Sub

Previous Document Next Document Back to Top

Copyright 2013 Corel Corporation. All rights reserved.