Слияние кода завершено, страница обновится автоматически
Attribute VB_Name = "条幅制作器"
'Copyright [2012-2019] [www.cdrvba.com]
'Licensed under the Apache License, Version 2.0 (the "License");
'you may not use this file except in compliance with the License.
'You may obtain a copy of the License at
' http://www.apache.org/licenses/LICENSE-2.0
'Unless required by applicable law or agreed to in writing, software
'distributed under the License is distributed on an "AS IS" BASIS,
'WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
'See the License for the specific language governing permissions and
'limitations under the License.
Public Type MyBanner
left As Double ' 距离文档左边的距离
top As Double ' 距离文档顶部的距离
length As Double ' 条幅长度
clothWidth As Double ' 布料宽度
ribbonWidth As Double ' 色带宽度
direction As String ' 方向
number As Integer ' 条数
textColor As String ' 文字色
fontName As String ' 字体名称
hasCutMarkLine As Boolean ' 是否有裁剪标记
hasInfoMarkText As Boolean ' 是否有备注文字
sideText As String ' 小字内容
sideTextPosition As String ' 小字内容的位置
mainText As String ' 主要内容
mainTextWidth As Double ' 主内容宽度
mainTextHeight As Double ' 主内容高度
inscribeText As String ' 落款内容
inscribeTextWidth As Double ' 落款内容宽度
inscribeTextHeight As Double ' 落款内容高度
End Type
Sub 运行()
UserForm2.Show
End Sub
'*****************************************************************************************************************************************************************************************************************************************
' 创建文档
'*****************************************************************************************************************************************************************************************************************************************
Public Function createCdrDocument(name As String, unit As Variant) As Document
Dim doc As Document
Set doc = CreateDocument()
doc.name = name
doc.unit = unit
Set createCdrDocument = doc
End Function
'*****************************************************************************************************************************************************************************************************************************************
' 在指定的位置画矩形
'*****************************************************************************************************************************************************************************************************************************************
Public Function drawRectangle(l As Double, t As Double, w As Double, h As Double) As Shape
Dim rec As Shape
Set rec = ActiveDocument.ActiveLayer.CreateRectangle2(l, t, w, h)
Set drawRectangle = rec
End Function
'*****************************************************************************************************************************************************************************************************************************************
' 在指定的位置绘制美术字文本
'*****************************************************************************************************************************************************************************************************************************************
Public Function drawArtisticText(l As Double, t As Double, text As String, fontName As String, fontSize As Double) As Shape
Dim rec As Shape
Set rec = ActiveDocument.ActiveLayer.CreateArtisticText(l, t, text, cdrLanguageNone, cdrCharSetMixed, fontName, fontSize)
Set drawArtisticText = rec
End Function
'*****************************************************************************************************************************************************************************************************************************************
' 给指定形状填充背景色
'*****************************************************************************************************************************************************************************************************************************************
Public Function fillShape(obj As Shape, c As Long, m As Long, y As Long, k As Long) As Boolean
obj.Fill.UniformColor.CMYKAssign c, m, y, k
fillShape = True
End Function
'*****************************************************************************************************************************************************************************************************************************************
' 载入默认配置
'*****************************************************************************************************************************************************************************************************************************************
Public Function loadDefaultSettings() As Boolean
UserForm2.cboFontName.text = "方正大黑简体"
UserForm2.cboCutMarkWidth.text = "5"
UserForm2.cboMainTextPercent.text = "90"
UserForm2.cboMinus.text = "40"
UserForm2.cboMainTextStyle.text = "美观优先"
UserForm2.cboJX.text = "5"
loadDefaultSettings = True
End Function
Вы можете оставить комментарий после Вход в систему
Неприемлемый контент может быть отображен здесь и не будет показан на странице. Вы можете проверить и изменить его с помощью соответствующей функции редактирования.
Если вы подтверждаете, что содержание не содержит непристойной лексики/перенаправления на рекламу/насилия/вульгарной порнографии/нарушений/пиратства/ложного/незначительного или незаконного контента, связанного с национальными законами и предписаниями, вы можете нажать «Отправить» для подачи апелляции, и мы обработаем ее как можно скорее.
Опубликовать ( 0 )