当前位置:网站首页>Aardio - 阴影渐变文字
Aardio - 阴影渐变文字
2022-07-01 07:50:00 【卢光庆】
本例使用了 godking.paint 库,请前往:http://chengxu.online 下载。
效果:


代码1:
import win.ui;
/*DSG{
{*/
var winform = win.form(text="aardio form";right=582;bottom=531)
winform.add(
plus={cls="plus";left=37;top=17;right=537;bottom=517;z=1}
)
/*}}*/
import godking.paint
var p = godking.paint.fromPlus(winform.plus,true/*自动刷新*/,true/*重绘背景*/)
//创建影线画刷
var b = p.brush.hatchBrush(10/*笔刷风格0-52*/,0xFF000000/*前景色*/,0xFFFFFFFF/*背景色*/)
//用画刷绘制影线文字
var font = ::LOGFONT(name="黑体";point=120;color=0xFFFF0000;brush=b)
p.drawText(,/*y1*/,/*x2*/,/*y2*/,"阴影文字",font,0,0,0)
//创建线性渐变画刷
colors = {0xFFFF0000,0xFF00FF00,0xFF0000FF,0xFF00FFFF,0xFFFFFF00,0xFFFF00FF}
points = {0,0.2,0.5,0.7,0.8,1}
b = p.brush.lineBrush({1,1}/*起始坐标*/,{200,200}/*结束坐标*/,colors/*颜色数组*/,points/*位置数组*/,/*包围模式wrapMode*/)
//用画刷绘制线性渐变文字
font.brush = b
p.drawText(-5,-5/*y1*/,/*x2*/,/*y2*/,"阴影文字",font,0,0,0)
winform.show();
win.loopMessage();代码2:
import win.ui;
/*DSG{
{*/
var winform = win.form(text="aardio form";right=582;bottom=531)
winform.add(
plus={cls="plus";left=37;top=17;right=537;bottom=517;z=1}
)
/*}}*/
import godking.paint
var p = godking.paint.fromPlus(winform.plus,true/*自动刷新*/,true/*重绘背景*/)
//创建阴影路径
var path=..gdip.path(1/*_FillModeWinding*/)
path.addstring("阴影文字",gdip.family("黑体"),0,120*1.31,::RECTF(5,5,winform.plus.width,winform.plus.height),gdip.stringformat())
//创建影线画刷
var b = p.brush.hatchBrush(18/*笔刷风格0-52*/,0xFF000000/*前景色*/,0xFFFFFFFF/*背景色*/)
//用画刷绘制影线文字
p.fillPath(path,b/*填充颜色或brush对象*/)
//创建前景文字路径
var path=..gdip.path(1/*_FillModeWinding*/)
path.addstring("阴影文字",gdip.family("黑体"),0,120*1.31,::RECTF(0,0,winform.plus.width,winform.plus.height),gdip.stringformat())
//创建线性渐变画刷
colors = {0xFFFF0000,0xFF00FF00,0xFF0000FF,0xFF00FFFF,0xFFFFFF00,0xFFFF00FF}
points = {0,0.2,0.5,0.7,0.8,1}
b = p.brush.lineBrush({1,1}/*起始坐标*/,{200,200}/*结束坐标*/,colors/*颜色数组*/,points/*位置数组*/,/*包围模式wrapMode*/)
//用画刷绘制线性渐变文字
p.drawPath(path,0xFF000000/*线条颜色或pen对象*/,3/*线宽*/)
p.fillPath(path,b/*填充颜色或brush对象*/)
winform.show();
win.loopMessage();边栏推荐
- [programming compulsory training 3] find the longest consecutive number string in the string + the number that appears more than half of the times in the array
- MATLAB之基础知识
- Redisson uses the complete solution - redisson official documents + Notes (Part 1)
- Stepsister becomes stepmother, son breaks off relationship with himself, and musk, the world's richest man, why is it so miserable?
- 力扣——求一组字符中的第一个回文字符
- LSTM of RNN
- PWN攻防世界int_overflow
- Software testing methods and techniques - overview of basic knowledge
- 2022广东省安全员A证第三批(主要负责人)特种作业证考试题库模拟考试平台操作
- Browser local storage
猜你喜欢

How to create an exclusive vs Code theme
![[batch DOS CMD summary] extension variables - delay variables CMD /v:on, CMD /v:off, SETLOCAL enabledelayedexpansion, disabledelayedexpansion](/img/ce/6c9e4f2c54710610e8b1f68d6d8088.png)
[batch DOS CMD summary] extension variables - delay variables CMD /v:on, CMD /v:off, SETLOCAL enabledelayedexpansion, disabledelayedexpansion

TodoList经典案例①

关系数据库如何工作

【批处理DOS-CMD命令-汇总和小结】-Cmd窗口中常用操作符(<、<<、&<、>、>>、&>、&、&&、||、|、()、;、@)

redisson使用全解——redisson官方文档+注释(上篇)

Android screen adaptation (using constraintlayout), kotlin array sorting

Minecraft 1.16.5模组开发(五十一) 方块实体 (Tile Entity)

Principle and process of embossing

2022制冷与空调设备运行操作国家题库模拟考试平台操作
随机推荐
Jax's deep learning and scientific computing
奥迪AUDI EDI 项目中供应商需要了解哪些信息?
【R语言】年龄性别频数匹配 挑选样本 病例对照研究,对年龄性别进行频数匹配
Li Kou daily question - day 31 -1502 Judge whether an arithmetic sequence can be formed
2022 test question bank and simulation test of tea master (primary) operation certificate
2022电工(中级)复训题库及答案
redisson使用全解——redisson官方文档+注释(中篇)
Office365 - how to use stream app to watch offline files at any time
LM08丨网格系列之网格反转(精)
Gui Gui programming (XV) - use scale to control font size changes
组件的自定义事件①
weback5基础配置详解
浅谈CVPR2022的几个研究热点
What information does the supplier need to know about Audi EDI project?
Apple账号密码自动填充
Those high-frequency written tests and interview questions in [Jianzhi offer & Niuke 101] - linked list
PWN attack and defense world int_ overflow
论文学习——水文时间序列相似性查询的分析与研究
【无标题】
Microsoft announces open source (Godel) language model chat robot