当前位置:网站首页>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.
边栏推荐
- c期末复习
- ROS installation error sudo: rosdep: command not found
- Oracle date format conversion to_ date,to_ char,to_ Timestamp mutual conversion
- Solutions contents have differences only in line separators
- Word finds red text word finds color font word finds highlighted formatted text
- 中文版Postman?功能真心强大!
- 鱼和熊掌可以兼得!天翼云弹性裸金属一招鲜!
- 2022年5月腾讯云开发者社区视频月度榜单公布
- 【HCIA-cloud】【1】云计算的定义、什么是云计算、云计算的架构与技术说明、华为云计算产品、华为内存DDR配置工具说明
- Oracle Chinese sorting Oracle Chinese field sorting
猜你喜欢
随机推荐
A cloud opens a new future of smart transportation
Ant group open source trusted privacy computing framework "argot": open and universal
Emqx 5.0 officially released: a single cluster supports 100million mqtt connections
U-Net: Convolutional Networks for Biomedical Images Segmentation
基于can总线的A2L文件解析(3)
跨境支付平台 XTransfer 的低代码实践:如何与其他中台融合是核心
RedHat7.4配置yum软件仓库(RHEL7.4)
Linear table - abstract data type
c语言简便实现链表增删改查「建议收藏」
Various pits of vs2017 QT
Windows Oracle open remote connection Windows Server Oracle open remote connection
ICML2022 | 长尾识别中分布外检测的部分和非对称对比学习
AI Open2022|基于异质信息网络的推荐系统综述:概念,方法,应用与资源
LeetCode 6111. Spiral matrix IV
Exemple Quelle est la relation entre le taux d'échantillonnage, l'échantillon et la durée?
线性表——抽象数据类型
如何快速进阶自动化测试?听听这3位BAT大厂测试工程师的切身感想....
7-2 keep the linked list in order
Thoroughly understand why network i/o is blocked?
MySQL优化六个点的总结