当前位置:网站首页>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();边栏推荐
- Aardio - 自己构造的getIconHandle的方法
- 2022 test question bank and simulation test of tea master (primary) operation certificate
- SharePoint - modify web application authentication using PowerShell
- 漏刻有时API接口实战开发系列(14):身份证实名鉴权验证
- Is it safe and reliable for Huatai Securities to open an account? How to open Huatai Securities Account
- [MySQL learning notes 28] storage function
- 关系数据库如何工作
- 力扣每日一题-第31天-1790.仅执行一次字符串交换能否使两个字符串相等
- ContentType所有类型对比
- 2022电工(中级)复训题库及答案
猜你喜欢

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

SharePoint - how to quickly check whether SharePoint is standard or enterprise edition?

AUTOSAR learning record (1) – ECUM_ Init

2022年茶艺师(中级)复训题库及答案

How outlook puts together messages with the same discussion
![[website architecture] solve 90% of distributed transactions in one move, and introduce the working principles and application scenarios of database transactions and distributed transactions](/img/2c/07d729d49b1d74553decac4588074e.png)
[website architecture] solve 90% of distributed transactions in one move, and introduce the working principles and application scenarios of database transactions and distributed transactions

TodoList经典案例①

Introduction to kubernetes resource objects and common commands (II)

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

How to troubleshoot SharePoint online map network drive failure?
随机推荐
The triode is a great invention
AArdio - 【问题】bass库回调时内存增长的问题
2022 tea master (intermediate) recurrent training question bank and answers
Li Kou daily question - Day 32 -1822 Symbol of array element product
She is the "HR of others" | ones character
2022年流动式起重机司机考试练习题及在线模拟考试
组件的自定义事件①
Aardio - 自己构造的getIconHandle的方法
PWN攻防世界int_overflow
Custom events of components ②
Redisson uses the full solution - redisson official document + comments (Part 2)
Li Kou daily question - day 31 -1790 Can a string exchange be performed only once to make two strings equal
Scala language learning-07-constructor
Download xshell and xftp
[skill] create Bat quick open web page
【mysql学习笔记26】视图
Principle and process of embossing
[batch dos-cmd command - summary and summary] - Common operators in the CMD window (<, < <, & <,>, > >, & >, & >, & &, ||, (),;, @)
How outlook puts together messages with the same discussion
Vhost kick & call principle