|
|
插件
| 插件名称: |
GDIplus |
| 版本号: |
exe |
| 授权方式: |
|
| 插件作者: |
872113804 |
| 是否开源: |
是 |
| 是否需要授权(贴内可放卡密,不可放授权链接): |
|
| 作者联系方式: |
872113804 |
| 交流群: |
|
| 下载地址: |
附件提供 |
马上登陆,加入晨风
您需要 登录 才可以下载或查看,没有账号?立即注册
×
本帖最后由 城南花未开 于 2019-2-13 11:57 编辑
主要是根据宽度换行和跳转
这个的话本来是出自 精易论坛 我只是后期 帮大家优化和更便捷使用
如有开发配置或者其他有兴趣的欢迎联系
模块大家 下载个GDIPLUS就可以了
回帖可见.版本 2
.子程序 绘制
.参数 绘制内容, 文本型
.参数 坐标_左边, 整数型
.参数 坐标_顶边, 整数型
.参数 坐标_宽度, 整数型
.参数 坐标_高度, 整数型
.参数 字体_, 文本型
.参数 颜色表, 文本型, 可空
.参数 像素, 整数型
.参数 填充, 整数型, , 1环绕 2交替
.参数 凤格, 整数型, , 1普通2加粗3倾斜4下滑5删除6加粗倾斜
.参数 平滑模式, 整数型, , 1无效 2默认 3抗锯齿 4最佳性能 5 不抗锯齿
.参数 色标, 文本型
.局部变量 Graphics, 整数型
.局部变量 Pen, 整数型
.局部变量 Brush, 整数型
.局部变量 Point1, 坐标F
.局部变量 Point2, 坐标F
.局部变量 RectI, 矩形L
.局部变量 fontfam, 整数型
.局部变量 strformat, 整数型
.局部变量 curfont, 整数型
.局部变量 rclayout, RectF
.局部变量 字体, 文本型
.局部变量 文本, 文本型
.局部变量 strPath, 整数型
GdipCreateFromHWND (取窗口句柄 (), Graphics)
.如果 (平滑模式 = 1)
GdipSetSmoothingMode (Graphics, #平滑模式_无效)
.否则
.如果 (平滑模式 = 2)
GdipSetSmoothingMode (Graphics, #平滑模式_默认)
.否则
.如果 (平滑模式 = 3)
GdipSetSmoothingMode (Graphics, #平滑模式_抗锯齿)
.否则
.如果 (平滑模式 = 4)
GdipSetSmoothingMode (Graphics, #平滑模式_最佳性能)
.否则
.如果 (平滑模式 = 5)
GdipSetSmoothingMode (Graphics, #平滑模式_不抗锯齿)
.否则
.如果结束
.如果结束
.如果结束
.如果结束
.如果结束
' GdipSetSmoothingMode (Graphics, #平滑模式_抗锯齿)
' GdipSetTextRenderingHint (Graphics, #文本渲染模式_ClearType文本和hinting技术)
字体 = 字体_
GdipCreateFontFamilyFromName (A2W (字体), 0, fontfam)
GdipCreateStringFormat (0, 0, strformat)
GdipSetStringFormatAlign (strformat, 0)
' GdipCreateFont (fontfam, 40, #字体风格_加粗, #单位_像素, curfont)
GdipCreateSolidFill (十六进制到十进制 (色标), Brush)
GdipCreatePen1 (十六进制到十进制 (颜色表), 1, #单位_像素, Pen)
RectI.左边 = 坐标_左边
RectI.顶边 = 坐标_顶边
RectI.宽度 = 坐标_宽度
RectI.高度 = 坐标_高度
文本 = 绘制内容
.如果 (填充 = 1)
GdipCreatePath (#填充模式_环绕, strPath)
.否则
.如果 (填充 = 2)
GdipCreatePath (#填充模式_交替, strPath)
.否则
返回 ()
.如果结束
.如果结束
.如果 (凤格 = 1)
GdipAddPathStringI (strPath, A2W (文本), lstrlenw (A2W (文本)), fontfam, #字体风格_普通, 像素, RectI, strformat)
.否则
.如果 (凤格 = 2)
GdipAddPathStringI (strPath, A2W (文本), lstrlenw (A2W (文本)), fontfam, #字体风格_加粗, 像素, RectI, strformat)
.否则
.如果 (凤格 = 3)
GdipAddPathStringI (strPath, A2W (文本), lstrlenw (A2W (文本)), fontfam, #字体风格_倾斜, 像素, RectI, strformat)
.否则
.如果 (凤格 = 4)
GdipAddPathStringI (strPath, A2W (文本), lstrlenw (A2W (文本)), fontfam, #字体风格_下划线, 像素, RectI, strformat)
.否则
.如果 (凤格 = 5)
GdipAddPathStringI (strPath, A2W (文本), lstrlenw (A2W (文本)), fontfam, #字体风格_删除线, 像素, RectI, strformat)
.否则
.如果 (凤格 = 6)
GdipAddPathStringI (strPath, A2W (文本), lstrlenw (A2W (文本)), fontfam, #字体风格_加粗倾斜, 像素, RectI, strformat)
.否则
返回 ()
.如果结束
.如果结束
.如果结束
.如果结束
.如果结束
.如果结束
' GdipAddPathStringI (strPath, A2W (文本), lstrlenw (A2W (文本)), fontfam, #字体风格_下划线, 像素, RectI, strformat)
GdipFillPath (Graphics, Brush, strPath)
GdipDrawPath (Graphics, Pen, strPath)
GdipDeleteFontFamily (fontfam)
GdipDeleteStringFormat (strformat)
GdipDeleteBrush (Brush)
GdipDeletePen (Pen)
GdipDeletePath (strPath)
GdipDeleteGraphics (Graphics)thank
|
|