当前位置:网站首页>Draw some interesting figures with flutter's canvas
Draw some interesting figures with flutter's canvas
2022-07-01 01:30:00 【Ma Nong on the island】
brief introduction
In the last article, we introduced the use of Flutter Of Canvas An example of drawing basic graphics , Simple examples are no fun , In today's article, let's have some interesting , We will complete the following drawing :
- Discover the beauty of mathematical repetition : Use equilateral triangles to form a rainbow umbrella surface .
- Drawing a rainbow .
- Draw a five pointed star for scoring .
Through this article , We can know the basic principle of custom shape drawing , Then you can draw the figure you want to draw on this basis .
Equilateral triangles build the beauty of repetition
First, let's draw an equilateral triangle , In fact, in the last article, we also drew equilateral triangles , It's just that the three vertices are calculated manually , In this article, we encapsulate a general method for drawing equilateral triangles . Old rules , First define the input parameters of the method , As shown below :
canvas:Canvascanvascolor: Draw colorsstartVertex: The position of the first vertex of the triangle , Here, our other edges rotate relative to this pointlength: Side lengthstartAngle: The angle at which the first edge rotates relative to the horizontal direction , In this way, we can change the included angle to change the drawing position of the triangle .clockwise: Draw clockwise , If it's clockwise , Then the offset angle drawn starts clockwise , Otherwise, counterclockwise .filled: Whether to fill the drawing .
void drawEquilateralTriangle(
Canvas 边栏推荐
- 奇偶链表[链表操作的两种大方向]
- MATLAB 最远点采样(FPS改进版)
- 友盟(软件异常实时监听的好帮手:Crash)接入教程(有点基础的小白最易学的教程)
- Opencv basic operation 2 realizes label2rgb and converts gray-scale images into color images
- 自定义注解实现校验
- (learning power + thinking power) x action power, summary of flywheel effect on the growth of technicians
- 分割链表[先取next再斩断链表防止断链]
- 未来的 Web3会带来什么?
- 解读创客教育所蕴含的科技素养
- 機器人編程的培訓學科類原理
猜你喜欢
![Split the linked list [take next first and then cut the linked list to prevent chain breakage]](/img/eb/708ab20c13df75f4dbd2d6461d3602.png)
Split the linked list [take next first and then cut the linked list to prevent chain breakage]

使用 C# 创造 ASCII 艺术

Construction and beautification of personal blog

Using recyclerreview to show banner is very simple

Basic knowledge 3 - standard unit library

Interpreting the scientific and technological literacy contained in maker Education

软件开发完整流程

Solve idea:class' xxx 'not found in module' xxx‘

flutter报错 -- The argument type ‘Function‘ can‘t be assigned to the parameter type ‘void Function()?‘

Zero of DC learning notes -- overview and basic process introduction
随机推荐
Basic knowledge II - Basic definitions related to sta
[leetcode] sum of two numbers [1]
Openmv and k210 of the f question of the 2021 video game call the openmv API for line patrol, which is completely open source.
Applet Custom Grid
Analyzing the wisdom principle in maker education practice
uniapp官方组件点击item无效,解决方案
DC学习笔记正式篇之零——综述与基本流程介绍
Principes de formation de la programmation robotique
Matlab farthest point sampling (FPS improved version)
Strictmode analysis activity leakage -strictmode principle (3)
[leetcode] climb stairs [70]
文件服务设计
TypeError: Argument ‘angle‘ can not be treated as a double
Poor students can also play raspberry pie
Win11安装redis 数据库以及redis desktop manager的下载
【网络丢包,网络延迟?这款神器帮你搞定所有!】
JS方法大全的一个小文档
Windows环境下安装MongoDB数据库
Service grid ASM year end summary: how do end users use the service grid?
用Steam教育启发学生多元化思维