这个代码不会调整,有会的朋友吗?
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
丢个源文件上来呗 jxyun99 发表于 2019-5-8 10:45
丢个源文件上来呗
我怎么发?可以远程协助吗? 楼主有前途,本人也正在学习代码;P 为啥你写一些注释全是英文? sixuncle 发表于 2019-5-8 14:33
为啥你写一些注释全是英文?
对,有些注释了,这个插件有几个版本,有些版本写法不一样 牛啊,首选 这个是啥功能,你的说出来啊。:lol
'You might have to use this line instead for CorelDRAW 9翻译过来是 对于coreldraw 9,您可能必须使用此行,这个因该是在低版本才能执行的代码。
彩广告 发表于 2019-5-8 17:46
牛啊,首选 这个是啥功能,你的说出来啊。
是CDR9旋转、比例、尺寸大小、倾斜的代码,老版本的 彩广告 发表于 2019-5-8 17:48
'You might have to use this line instead for CorelDRAW 9翻译过来是 对于coreldraw 9,您可能必须 ...
是低版的插件,朋友你会调试吗?
页:
[1]
2