1 В избранное 0 Ответвления 0

OSCHINA-MIRROR/zebe-coreldraw-banner-maker

Присоединиться к Gitlife
Откройте для себя и примите участие в публичных проектах с открытым исходным кодом с участием более 10 миллионов разработчиков. Приватные репозитории также полностью бесплатны :)
Присоединиться бесплатно
Клонировать/Скачать
条幅制作器.bas 5.4 КБ
Копировать Редактировать Web IDE Исходные данные Просмотреть построчно История
Zebe Отправлено 11.10.2019 18:29 fc95caa
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 )

Вы можете оставить комментарий после Вход в систему

1
https://api.gitlife.ru/oschina-mirror/zebe-coreldraw-banner-maker.git
git@api.gitlife.ru:oschina-mirror/zebe-coreldraw-banner-maker.git
oschina-mirror
zebe-coreldraw-banner-maker
zebe-coreldraw-banner-maker
master