当前位置:网站首页>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();边栏推荐
- Custom events of components ①
- Microsoft announces open source (Godel) language model chat robot
- [R language] age sex frequency matching select samples for case-control study, and perform frequency matching on age and sex
- kubernetes资源对象介绍及常用命令(二)
- TodoList经典案例①
- 长路漫漫、技术作伴
- Redisson watchdog mechanism, redisson watchdog performance problems, redisson source code analysis
- 下载Xshell和Xftp
- Sorting out tcp/udp communication problems
- [R language] two /n data merge functions
猜你喜欢

论文学习——水文时间序列相似性查询的分析与研究

How to troubleshoot SharePoint online map network drive failure?
![[untitled]](/img/c2/63286ba00321c9cdef43ff40635a67.png)
[untitled]

Android screen adaptation (using constraintlayout), kotlin array sorting

2022 Guangdong Provincial Safety Officer a certificate third batch (main person in charge) special operation certificate examination question bank simulated examination platform operation

Significance and measures of source code encryption

Gru of RNN

源代码加密的意义和措施

LM08丨网格系列之网格反转(精)

AUTOSAR learning record (1) – ECUM_ Init
随机推荐
C# Newtonsoft. Use of job in JSON
Li Kou daily question - Day 32 -1822 Symbol of array element product
kubernetes资源对象介绍及常用命令(二)
What information does the supplier need to know about Audi EDI project?
Scala language learning-07-constructor
【技能】创建.bat快速打开网页
2022 tea master (intermediate) recurrent training question bank and answers
Two expressions of string
redisson使用全解——redisson官方文檔+注釋(上篇)
[R language] age sex frequency matching select samples for case-control study, and perform frequency matching on age and sex
Is it safe and reliable for Huatai Securities to open an account? How to open Huatai Securities Account
Detailed explanation of weback5 basic configuration
Cadence OrCAD capture "network name" is the same, but it is not connected or connected incorrectly. The usage of nodeName of liberation scheme
Software testing methods and techniques - overview of basic knowledge
Redisson watchdog mechanism, redisson watchdog performance problems, redisson source code analysis
weback5基础配置详解
MATLAB之基础知识
[kv260] generate chip temperature curve with xadc
[chapter 72 of the flutter problem series] a solution to the problem that pictures taken in the flutter using the camera plug-in are stretched
Caesar