当前位置:网站首页>Taishan Office Technology Lecture: from the layout height of the line, talk about the height overflow and height shrinkage of the drawing height (launched in the whole network)
Taishan Office Technology Lecture: from the layout height of the line, talk about the height overflow and height shrinkage of the drawing height (launched in the whole network)
2022-07-05 18:55:00 【Liu Kunpeng】
In the previous post , I propose to remove , Row view except for font height , There is also a layout height . Now we have to put forward the concept of drawing height . What is the drawing height ? for instance , The layout height is 18.1, The height when drawing is generally 18, Maybe not . At this time, you need to draw the height .
How does the drawing height come from ? The drawing height is caused by the fact that pixels are integers . For example, row height 18.1, from 96 Began to draw ,5 After that y The coordinates are 96+90.5. Obviously, it can't be floating-point pixels when drawing , So round it up , Namely 96+91. What about height ? The situation is even more complicated . According to the mantissa , There are actually four situations :
- Draw height , Normal situation .y Decimal is less than 0.5,y+height Decimal is less than 0.5
- Draw height , Normal situation .y The decimal is greater than 0.5,y+height The decimal is greater than 0.5
- Draw height , Height shrinkage .y The decimal is greater than 0.5,y+height Decimal is less than 0.5
At this time, the drawing height shrinks 1 Pixel , from 18 become 17.
- Draw height , Height overflow .y Decimal is less than 0.5,y+height The decimal is greater than 0.5
At this time, the drawing height overflows 1 Pixel , from 18 become 19.
边栏推荐
- 技术分享 | 接口测试价值与体系
- Oracle日期格式转换 to_date,to_char,to_timetamp 相互转换
- Oracle date format conversion to_ date,to_ char,to_ Timestamp mutual conversion
- Insufficient picture data? I made a free image enhancement software
- Personal understanding of convolutional neural network
- @Extension, @spi annotation principle
- 7-2 keep the linked list in order
- Is it safe to open an account, register and dig money? Is there any risk? Is it reliable?
- LeetCode 6111. Spiral matrix IV
- vs2017 qt的各种坑
猜你喜欢
Thoroughly understand why network i/o is blocked?
爬虫01-爬虫基本原理讲解
如何写出好代码 - 防御式编程
Low code practice of xtransfer, a cross-border payment platform: how to integrate with other medium-sized platforms is the core
2022最新Android面试笔试,一个安卓程序员的面试心得
Summary of six points of MySQL optimization
The 2022 China Xinchuang Ecological Market Research and model selection evaluation report released that Huayun data was selected as the mainstream manufacturer of Xinchuang IT infrastructure!
[detailed explanation of AUTOSAR 14 startup process]
尚硅谷尚优选项目教程发布
一朵云开启智慧交通新未来
随机推荐
Ant group open source trusted privacy computing framework "argot": open and universal
The 11th China cloud computing standards and Applications Conference | China cloud data has become the deputy leader unit of the cloud migration special group of the cloud computing standards working
MYSQL中 find_in_set() 函数用法详解
LeetCode 6109. Number of people who know the secret
@Extension, @spi annotation principle
Windows Oracle open remote connection Windows Server Oracle open remote connection
Optimization of middle alignment of loading style of device player in easycvr electronic map
SAP feature description
进程间通信(IPC):共享内存
Memory leak of viewpager + recyclerview
MySQL数据库索引教程(超详细)
Oracle Chinese sorting Oracle Chinese field sorting
关于服装ERP,你想知道的都在这里了
Is it safe for golden sun to open an account? Can I open an account free of 5 in case?
Reading notes of Clickhouse principle analysis and Application Practice (5)
从外卖点单浅谈伪需求
瞅一瞅JUC提供的限流工具Semaphore
Is it complicated to open an account? Is online account opening safe?
蚂蚁集团开源可信隐私计算框架「隐语」:开放、通用
Mysql database indexing tutorial (super detailed)