当前位置:网站首页>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 边栏推荐
- 图的连通性基础
- 【Qt5-基础篇】随机数显示屏展示
- [network packet loss and network delay? This artifact can help you deal with everything!]
- One of the basics - overview of sta Basics
- MATLAB 最远点采样(FPS改进版)
- Use strictmode strictmode principle (1)
- System settings large page
- Open3D 点云颜色渲染
- Inspire students' diversified thinking with steam Education
- Green, green the reed. dew and frost gleam.
猜你喜欢

Interpreting the scientific and technological literacy contained in maker Education

Dx-11q signal relay

Looksrare team's "cash out" caused disturbance

基础知识之一——STA基础概述

Complete software development process

农产品换房?“变相”购房补贴!

Q play soft large toast to bring more comfortable sleep

Basic knowledge II - Basic definitions related to sta
![[problem handled] -nvidia SMI command cannot obtain the GPU process number of its own container and the external GPU process number](/img/51/e48e222c14f4a4e9f2be91a677033f.png)
[problem handled] -nvidia SMI command cannot obtain the GPU process number of its own container and the external GPU process number
![[go] go implements row column conversion of sets](/img/d9/6272e55b2d9c6b6fbdf2537773bb83.png)
[go] go implements row column conversion of sets
随机推荐
【栈】921. Minimum Add to Make Parentheses Valid
Openmv and k210 of the f question of the 2021 video game call the openmv API for line patrol, which is completely open source.
JS方法大全的一个小文档
【网络丢包,网络延迟?这款神器帮你搞定所有!】
Windows环境下安装MongoDB数据库
MATLAB 最远点采样(FPS改进版)
Visual studio 2019 Download
Document service design
Interpreting the scientific and technological literacy contained in maker Education
Thinking brought by strictmode -strictmode principle (5)
Use of typora
Using recyclerreview to show banner is very simple
Solve idea:class' xxx 'not found in module' xxx‘
uniapp官方组件点击item无效,解决方案
[problem handled] -nvidia SMI command cannot obtain the GPU process number of its own container and the external GPU process number
【Qt5-基础篇】随机数显示屏展示
图的连通性基础
Construction and beautification of personal blog
【动态规划】路径dp:931. Minimum Falling Path Sum
Parity linked list [two general directions of linked list operation]