当前位置:网站首页>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
边栏推荐
- STC8H开发(十五): GPIO驱动Ci24R1无线模块
- JS解混淆-AST还原案例
- “稚晖君”为2022昇腾AI创新大赛打call 期待广大开发者加入
- PHP 二维数组根据某个字段排序
- 用户代码未处理MetadataException
- 【EF】 更新条目时出错。有关详细信息,请参见内部异常。[通俗易懂]
- Interpretation of the paper (DropEdge) "DropEdge: Towards Deep Graph Convolutional Networks on Node Classification"
- TF中random.normal()与random.truncated_normal()
- 发送激活邮件「建议收藏」
- Sudoku | Backtrack-7
猜你喜欢
[Cloud Native] 4.2 DevOps Lectures
Converting angles to radians
SQLi-LABS Page-2 (Adv Injections)
Flask's routing (app.route) detailed
Blender程序化建模简明教程【PCG】
MLOps的演进历程
ACM MM 2022 | Cloud2Sketch: Painting with clouds in the sky, AI brush strokes
【双链表增删查改接口的实现】
“稚晖君”为2022昇腾AI创新大赛打call 期待广大开发者加入
【微服务~Nacos】Nacos之配置中心
随机推荐
Technology Sharing | How to use the JSON Schema mode of interface automation testing?
AI识万物:从0搭建和部署手语识别系统
BulkInsert方法实现批量导入
《强化学习周刊》第57期:DL-DRL、FedDRL & Deep VULMAN
Usage of placeholder function in Tensorflow
MLOps的演进历程
unit test
L3-2 Delete up to three characters (30 points)
STC8H Development (15): GPIO Drives Ci24R1 Wireless Module
深度剖析 Apache EventMesh 云原生分布式事件驱动架构
Blender程序化建模简明教程【PCG】
nvm下node安装;node环境变量配置
Use convert_to_tensor in Tensorflow to specify the type of data
万字总结:分布式系统的38个知识点
js数组对象去重
Tensorflow中placeholder函数的用法
Shanghai Konan SmartRocket series product introduction (3): SmartRocket iVerifier computer interlocking system verification tool
从产品角度看 L2 应用:为什么说这是一个游乐场?
js十五道面试题(含答案)
JS解混淆-AST还原案例