当前位置:网站首页>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();边栏推荐
- go通用动态重试机制解决方案的实现与封装
- Li Kou daily question - Day 32 -1822 Symbol of array element product
- 关系数据库如何工作
- 2022 operation of refrigeration and air conditioning equipment operation of national question bank simulated examination platform
- 软件测试方法和技术 - 基础知识概括
- 2022危险化学品经营单位主要负责人试题及模拟考试
- Microsoft stream - how to modify video subtitles
- 2022 tea master (intermediate) recurrent training question bank and answers
- 她就是那个「别人家的HR」|ONES 人物
- Missing API interface actual development series (14): ID card real name authentication verification
猜你喜欢

Custom events of components ①

2022 test question bank and simulation test of tea master (primary) operation certificate

ONES 创始人王颖奇对话《财富》(中文版):中国有没有优秀的软件?

TodoList经典案例①

I bet on performance and won the CTO of the company. I want to build Devops platform!

Redisson uses the full solution - redisson official document + comments (Part 2)

Introduction to kubernetes resource objects and common commands (II)

下载Xshell和Xftp
![[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](/img/5e/068268857b8c7c2065ba552fd23dbb.png)
[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

kubernetes资源对象介绍及常用命令(二)
随机推荐
[MySQL learning notes27] stored procedure
Significance and measures of source code encryption
2022茶艺师(初级)操作证考试题库及模拟考试
QT -- 1. QT connection database
Redisson uses the full solution - redisson official document + comments (Part 2)
[programming training] delete public characters (hash mapping) + team competition (greedy)
【批处理DOS-CMD-汇总】扩展变量-延迟变量cmd /v:on、cmd /v:off、setlocal enabledelayedexpansion、DisableDelayedExpansion
SharePoint - how to quickly check whether SharePoint is standard or enterprise edition?
Download xshell and xftp
Oracle create auto increment ID
Introduction to kubernetes resource objects and common commands (II)
下载Xshell和Xftp
2022 test questions and mock examinations for main principals of hazardous chemicals business units
Gui Gui programming (XV) - use scale to control font size changes
Basic knowledge of MATLAB
组件的自定义事件②
Custom events of components ①
她就是那个「别人家的HR」|ONES 人物
How to check ad user information?
Those high-frequency written tests and interview questions in [Jianzhi offer & Niuke 101] - linked list