当前位置:网站首页>Shuttle uses custompaint to paint basic shapes
Shuttle uses custompaint to paint basic shapes
2022-06-28 02:39:00 【Ma Nong on the island】
Preface
Last one First time to know Flutter Drawing components for — CustomPaint We introduced CustomPaint The basic concept and use of , You can see CustomPaint Actually sum Front-end Canvas It's basically the same , Actually the front end Canvas Supported drawing methods CustomPaint All support , After all CustomPaint It's also based on Canvas Realized . In this article we will introduce CustomPaint Drawing basic graphics .
Draw a rectangle
Drawing a rectangle is relatively simple , The method is defined as follows :
void drawRect(Rect rect, Paint paint)
among rect To draw a rectangle ,paint That is, the brush configuration object . For example, we want to draw a width horizontally in the middle 200 x 120 The rectangular , You can use the following code :
canvas.drawColor(Color(0xFFF1F1F1), BlendMode.color);
var center = size / 2;
// Draw a rectangle
var paint = Paint()..color = Color(0xFF2080E5);
paint.strokeWidth = 2.0;
canvas.drawRect(
Rect.fromLTWH(center.width - 100, 60, 200, 120),
边栏推荐
- 如何以数据驱动「客户全生命周期管理」,提高线索转化率及客户满意度?
- 如何系统学习LabVIEW?
- 【历史上的今天】6 月 24 日:网易成立;首届消费电子展召开;世界上第一次网络直播
- How technicians become experts in technical field
- File transfer protocol --ftp
- 后勤事务繁杂低效?三步骤解决企业行政管理难题
- SQL 注入绕过(四)
- Explanation of OSI layer 7 model (easy to understand in Chinese)
- 迪赛智慧数——柱状图(折柱混合图):2021年毕业季租房价格和房租收入比
- 【历史上的今天】6 月 5 日:洛夫莱斯和巴贝奇相遇;公钥密码学先驱诞生;函数语言设计先驱出生
猜你喜欢

Based on am335x development board arm cortex-a8 -- acontis EtherCAT master station development case

MySQL优化小技巧

数智学习|湖仓一体实践与探索

Solutions to st link USB communication error

数仓的字符截取三胞胎:substrb、substr、substring

Digital intelligence learning Lake Warehouse Integration Practice and exploration

【历史上的今天】6 月 23 日:图灵诞生日;互联网奠基人出生;Reddit 上线

How to handle computer security certificate errors

NER中BiLSTM-CRF解读Forward_algorithm

【历史上的今天】6 月 24 日:网易成立;首届消费电子展召开;世界上第一次网络直播
随机推荐
Jenkins - email notification plug-in
Low code solution - a low code solution for digital after-sales service covering the whole process of work order, maintenance and Finance
LeetCode - Easy - 197
STM32F1与STM32CubeIDE编程实例-金属触摸传感器驱动
【方块编码】基于matlab的图像方块编码仿真
【历史上的今天】6 月 2 日:苹果推出了 Swift 编程语言;电信收购联通 C 网;OS X Yosemite 发布
【历史上的今天】6 月 19 日:iPhone 3GS 上市;帕斯卡诞生;《反恐精英》开始测试
Mysql大合集,你要内容的这里全都有
【历史上的今天】6 月 11 日:蒙特卡罗方法的共同发明者出生;谷歌推出 Google 地球;谷歌收购 Waze
Keil "St link USB communication error" solution
MySQL optimization tips
From how to use to how to implement a promise
Ti am3352/54/59 industrial core board hardware specification
【历史上的今天】6 月 10 日:Apple II 问世;微软收购 GECAD;发明“软件工程”一词的科技先驱出生
4G-learn from great partners
I forgot my cell phone today
OSI 7层模型讲解(大白话 通俗易懂)
AAVE launches lens protocol, a Web3 social media platform
File transfer protocol --ftp
NER中BiLSTM-CRF解读Forward_algorithm