![]() |
![]() |
Shape.OriginalWidth
Property OriginalWidth As Double
Member of Shape
The OriginalWidth property returns the width of a shape when it was created, before any transformations were applied to it.
The OriginalWidth property returns a read-only value.
The following code example creates a rectangle that copies all of the transformations of the currently selected shape:
Sub Test() Const g2rad As Double = 1.74532925199433E-02 Dim s As Shape, r As Shape Dim x As Double, y As Double Set s = ActiveShape If s Is Nothing Then MsgBox "Nothing selected. Please try again", vbCritical Exit Sub End If ActiveDocument.ReferencePoint = cdrCenter s.GetPosition x, y x = x - s.OriginalWidth / 2 y = y - s.OriginalHeight / 2 Set r = ActiveLayer.CreateRectangle2(x, y, s.OriginalWidth, s.OriginalHeight) r.Stretch s.AbsoluteHScale, s.AbsoluteVScale * Cos(s.AbsoluteSkew * g2rad) r.Skew s.AbsoluteSkew, 0 r.Rotate s.RotationAngle End Sub
![]() |
![]() |
![]() |
Copyright 2007 Corel Corporation. All rights reserved.