声明:
本文只作为简单记录而已,并非教程。
插件要求:
将选中的字符转换成曲线、再转成虚线,并去掉填充色。
相应环境说明:
- 开发环境:Windows 7 32bit
- 软件基础:CorelDRAW X4
- 开发语言:VBA
开发说明:
开发难度不高,编程语言简单易懂,查找资料花费过多时间。
核心代码:
Private Sub ConvToDotted_Click() If ActiveSelection.Shapes.Count = 0 Then response = MsgBox("没有选择任何对象,请选择一个对象。", vbExclamation + vbDefaultButton1, "错误提示") Else ActiveSelection.ConvertToCurves ActiveSelection.Shapes.Item(1).Fill.UniformColor.CMYKAssign 0, 0, 0, 0 ActiveSelection.Shapes.Item(1).Outline.Width = 0.001 ActiveSelection.Shapes.Item(1).Outline.Style.DashCount = 2 ActiveSelection.Shapes.Item(1).Outline.Color.CMYKAssign 0, 99, 95, 0 End If End Sub
使用前后对比:
前
后:
最后附上本人找到的一些资料: