当前位置:网站首页>Flutter 绘制美不胜收的光影流动效果
Flutter 绘制美不胜收的光影流动效果
2022-08-09 21:54:00 【岛上码农】
前言
Flutter 的画笔类 Paint
提供了很多图形绘制的配置属性,来供我们绘制更丰富多彩的图形。前面几篇我们介绍了 shader
属性来绘制全屏渐变的聊天气泡背景、渐变流动的边框和毛玻璃效果的背景图片,具体可以参考下面几篇文章。
本篇我们引入一个 Paint
类新的属性:maskFilter
,再结合之前的 shader
和动画,看看能玩出什么花样。
MaskFilter 类简介
MaskFilter 类,顾名思义是遮罩过滤器,也就是在绘制过程中给图像加一层遮罩效果,这个遮罩效果是通过某种变换函数实现的。Flutter 官方文档的说明如下,可以看出其实就是对位图的颜色处理。
A mask filter to apply to shapes as they are painted
边栏推荐
- Leetcode 93 IP addresses
- TF中random.normal()与random.truncated_normal()
- 阿里云架构师金云龙:基于云XR平台的视觉计算应用部署
- AI+Medical: Using Neural Networks for Medical Image Recognition and Analysis
- Domestic mobile phone manufacturers once fought for it, but now it is the first to collapse...
- 孙正义亏掉1500亿:当初投贵了
- AI Knows Everything: Building and Deploying a Sign Language Recognition System from Zero
- SQLi-LABS Page-2 (Adv Injections)
- 宝塔实测-搭建LightPicture开源图床系统
- Synchronization lock synchronized traces the source
猜你喜欢
金山云地震,震源在字节?
SQLi-LABS Page-2 (Adv Injections)
腾讯继续挥舞降本增效“大刀”,外包员工免费餐饮福利被砍了
Synchronization lock synchronized traces the source
js十五道面试题(含答案)
MLOps的演进历程
This article lets you quickly understand implicit type conversion [integral promotion]!
Shanghai Konan SmartRocket series product introduction (3): SmartRocket iVerifier computer interlocking system verification tool
JSON 基本使用
一本通2074:【21CSPJ普及组】分糖果(candy)
随机推荐
ACM MM 2022 | Cloud2Sketch: Painting with clouds in the sky, AI brush strokes
random.normal() and random.truncated_normal() in TF
【微服务~Nacos】Nacos之配置中心
“稚晖君”为2022昇腾AI创新大赛打call 期待广大开发者加入
Quotefancy ,提供鼓舞人心语录的壁纸网站 - 倾城之链
上海控安SmartRocket系列产品推介(三):SmartRocket iVerifier计算机联锁系统验证工具
台风生成,广州公交站场积极开展台风防御安全隐患排查
CVPR22 Oral | shunt through multi-scale token polymerization from attention, code is open source
AI Knows Everything: Building and Deploying a Sign Language Recognition System from Zero
【EF】数据表全部字段更新与部分字段更新
TF生成均匀分布的tensor
在VMware上安装win虚拟机
Use convert_to_tensor in Tensorflow to specify the type of data
埃氏筛选法:统计素数个数
【微服务~Nacos】Nacos服务提供者和服务消费者
在“企业通讯录”的盲区,融云的边界与分寸
PHP 2D array sorted by a field
Bean life cycle
Tensorflow中使用convert_to_tensor去指定数据的类型
js数组对象去重