- 精华
- 活跃值
-
- 积分
- 229
- 违规
-
- 印币
-
- 鲜花值
-
- 在线时间
- 小时
累计签到:10 天 连续签到:0 天
|
If ActiveDocument.Selection.Shapes.Count < 1 Then Exit Sub
' If blDuplicate = True Then ActiveSelection.Duplicate 0, 0
If blDuplicate = True Then CorelScript.DuplicateObject 0, 0 'You might have to use this line instead for CorelDRAW 9
'And do it
' Set sShapes = ActiveSelection.Shapes
Set sShapes = ActiveDocument.Selection.Shapes 'Use this line instead for CorelDRAW 9.
If blConstrAIn = False Then
For Each sShape In sShapes
dX = sShape.PositionX
dY = sShape.PositionY
If blWidth = True Then dScaleX = dWidth / sShape.SizeWidth Else dScaleX = 1
If blHeight = True Then dScaleY = dHeight / sShape.SizeHeight Else dScaleY = 1
Call sShape.Stretch(dScaleX, dScaleY)
Call sShape.Move(dX - sShape.PositionX, dY - sShape.PositionY)
'Call sShape.SetSize(dWidth, dHeight)
'If blWidth = True Then sShape.SizeWidth = dWidth
'If blHeight = True Then sShape.SizeHeight = dHeight
'Call sShape.StretchEx(dScaleX, dScaleX, dX, dY) 'Harumph, this isn't implemented yet
Next sShape
Else
For Each sShape In sShapes
' Call sShape.GetPosition(dX, dY)
dX = sShape.PositionX
dY = sShape.PositionY
If blWidth = True Then
dScaleX = dWidth / sShape.SizeWidth
Else
dScaleX = dHeight / sShape.SizeHeight
End If
Call sShape.Stretch(dScaleX, dScaleX) 'This is a temporary measure, and should work in CDR9
Call sShape.Move(dX - sShape.PositionX, dY - sShape.PositionY) 'This is a temporary measure, and should work in CDR9
'Call sShape.StretchEx(dScaleX, dScaleX, dX, dY) 'Not implemented yet.
Next sShape
End If
|
|