Previous Document Next Document

Object Model Reference : Classes : S : Shape : Methods : Shape.Move


Shape.Move

Sub Move(DeltaX As Double, DeltaY As Double)

Description

Member of Shape

The Move method moves a shape by a specified offset, relative to its previous position. Positive values of offset move the shape to the right and upwards, while negative values move it to the left and downwards.

Parameter
Description
DeltaX
Specifies the horizontal distance to move the shape
DeltaY
Specifies the vertical distance to move the shape

VBA example

The following VBA example creates a blend between two circles, separates the blend group, and scatters all intermediate blend steps randomly.

Sub Test()
 Dim s1 As Shape, s2 As Shape
 Dim e As Effect, sr As ShapeRange
 Dim s As Shape
 Set s1 = ActiveLayer.CreateEllipse(0, 10, 2, 8)
 Set s2 = s1.Duplicate(5, -7)
 s1.Fill.UniformColor.CMYKAssign 0, 0, 100, 0
 s2.Fill.UniformColor.CMYKAssign 0, 100, 100, 0
 Set e = s2.CreateBlend(s1)
 Set sr = e.Separate
 For Each s In sr(1).Shapes
  s.Move Rnd() - 0.5, Rnd() - 0.5
 Next s
End Sub

Previous Document Next Document Back to Top

Copyright 2013 Corel Corporation. All rights reserved.