当前位置:网站首页>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();
边栏推荐
- Rk3399 platform development series explanation (network debugging) 7.30. What will affect the sending process of TCP packets?
- How to check ad user information?
- Do securities account opening affect the security of account opening
- Redisson uses the full solution - redisson official documents + comments (Part 2)
- 2022 test question bank and simulation test of tea master (primary) operation certificate
- Sqlalchemy creating MySQL_ Table
- Cadence OrCAD capture "network name" is the same, but it is not connected or connected incorrectly. The usage of nodeName of liberation scheme
- 下载Xshell和Xftp
- 2022 test questions and mock examinations for main principals of hazardous chemicals business units
- Download xshell and xftp
猜你喜欢
SharePoint - how to quickly check whether SharePoint is standard or enterprise edition?
base64
2022 electrician (intermediate) recurrent training question bank and answers
LSTM of RNN
What information does the supplier need to know about Audi EDI project?
Why some people earn nearly 10billion a year, while others earn 3000 a month: the details you ignore actually make the most money
Wang Yingqi, founder of ones, talks to fortune (Chinese version): is there any excellent software in China?
Todolist classic case ①
TodoList经典案例①
Atguigu---- scaffold --02- use scaffold (2)
随机推荐
Huawei modelarts training alexnet model
Software testing methods and techniques - overview of basic knowledge
Oracle创建自增id
2022制冷与空调设备运行操作国家题库模拟考试平台操作
How outlook puts together messages with the same discussion
[batch dos-cmd command - summary and summary] - Common operators in the CMD window (<, < <, & <,>, > >, & >, & >, & &, ||, (),;, @)
The triode is a great invention
redisson使用全解——redisson官方文檔+注釋(上篇)
【批处理DOS-CMD命令-汇总和小结】-Cmd窗口中常用操作符(<、<<、&<、>、>>、&>、&、&&、||、|、()、;、@)
Li Kou daily question - day 31 -1790 Can a string exchange be performed only once to make two strings equal
[untitled]
Why some people earn nearly 10billion a year, while others earn 3000 a month: the details you ignore actually make the most money
Caesar
TCP/UDP 通信问题整理
[website architecture] solve 90% of distributed transactions in one move, and introduce the working principles and application scenarios of database transactions and distributed transactions
Li Kou daily question - day 31 -1502 Judge whether an arithmetic sequence can be formed
华为ModelArts训练Alexnet模型
C# Newtonsoft. Use of job in JSON
力扣——求一组字符中的第一个回文字符
How relational databases work