当前位置:网站首页>Aardio - Shadow Gradient Text
Aardio - Shadow Gradient Text
2022-07-01 07:56:00 【Luguangqing】
This example uses the godking.paint library , Please go to :http://chengxu.online download .
effect :


Code 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/* Automatically refresh */,true/* Redraw the background */)
// Create a hatch brush
var b = p.brush.hatchBrush(10/* Brush style 0-52*/,0xFF000000/* The foreground */,0xFFFFFFFF/* Background color */)
// Draw hatched text with a brush
var font = ::LOGFONT(name=" In black ";point=120;color=0xFFFF0000;brush=b)
p.drawText(,/*y1*/,/*x2*/,/*y2*/," Shaded text ",font,0,0,0)
// Create a linear gradient brush
colors = {0xFFFF0000,0xFF00FF00,0xFF0000FF,0xFF00FFFF,0xFFFFFF00,0xFFFF00FF}
points = {0,0.2,0.5,0.7,0.8,1}
b = p.brush.lineBrush({1,1}/* The starting coordinates */,{200,200}/* End coordinates */,colors/* Color array */,points/* Position array */,/* Surround mode wrapMode*/)
// Draw linear gradient text with a brush
font.brush = b
p.drawText(-5,-5/*y1*/,/*x2*/,/*y2*/," Shaded text ",font,0,0,0)
winform.show();
win.loopMessage();Code 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/* Automatically refresh */,true/* Redraw the background */)
// Create shadow path
var path=..gdip.path(1/*_FillModeWinding*/)
path.addstring(" Shaded text ",gdip.family(" In black "),0,120*1.31,::RECTF(5,5,winform.plus.width,winform.plus.height),gdip.stringformat())
// Create a hatch brush
var b = p.brush.hatchBrush(18/* Brush style 0-52*/,0xFF000000/* The foreground */,0xFFFFFFFF/* Background color */)
// Draw hatched text with a brush
p.fillPath(path,b/* Fill color or brush object */)
// Create foreground text path
var path=..gdip.path(1/*_FillModeWinding*/)
path.addstring(" Shaded text ",gdip.family(" In black "),0,120*1.31,::RECTF(0,0,winform.plus.width,winform.plus.height),gdip.stringformat())
// Create a linear gradient brush
colors = {0xFFFF0000,0xFF00FF00,0xFF0000FF,0xFF00FFFF,0xFFFFFF00,0xFFFF00FF}
points = {0,0.2,0.5,0.7,0.8,1}
b = p.brush.lineBrush({1,1}/* The starting coordinates */,{200,200}/* End coordinates */,colors/* Color array */,points/* Position array */,/* Surround mode wrapMode*/)
// Draw linear gradient text with a brush
p.drawPath(path,0xFF000000/* Line color or pen object */,3/* Line width */)
p.fillPath(path,b/* Fill color or brush object */)
winform.show();
win.loopMessage();边栏推荐
- 2022年茶艺师(中级)复训题库及答案
- [MySQL learning notes 25] SQL statement optimization
- 2022广东省安全员A证第三批(主要负责人)特种作业证考试题库模拟考试平台操作
- How do the top ten securities firms open accounts? In addition, is it safe to open a mobile account?
- Conscience Amway universal wheel SolidWorks model material website
- 【技能】创建.bat快速打开网页
- 凸印的印刷原理及工艺介绍
- sqlalchemy创建MySQL_Table
- matlab保存DB4i深度相机图片
- 软件测试方法和技术 - 基础知识概括
猜你喜欢

组件的自定义事件②

良心安利万向轮 SolidWorks模型素材网站

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

TodoList经典案例①

kubernetes资源对象介绍及常用命令(二)

Introduction to kubernetes resource objects and common commands (II)

下载Xshell和Xftp

她就是那个「别人家的HR」|ONES 人物

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

浏览器本地存储
随机推荐
What information does the supplier need to know about Audi EDI project?
postgresql源码学习(26)—— Windows vscode远程调试Linux上的postgresql
三极管是一项伟大的发明
长路漫漫、技术作伴
Office365 - how to use stream app to watch offline files at any time
MATLAB之基础知识
How relational databases work
组件的自定义事件①
038 network security JS
Latex table
十大劵商如何开户?另外,手机开户安全么?
凸印的印刷原理及工艺介绍
Redisson uses the complete solution - redisson official documents + Notes (Part 1)
How to check ad user information?
Custom events of components ②
Browser local storage
【mysql学习笔记26】视图
redisson使用全解——redisson官方文档+注释(上篇)
Eigen矩阵运算库快速上手
Todolist classic case ①