当前位置:网站首页>泰山OFFICE技术讲座:由行的布局高度,谈绘制高度的高度溢出、高度缩水(全网首发)
泰山OFFICE技术讲座:由行的布局高度,谈绘制高度的高度溢出、高度缩水(全网首发)
2022-07-05 18:36:00 【柳鲲鹏】
在之前的博文中,吾提出除,行视图除了字体高度,还有一个布局高度。现在又要提出绘制高度的概念。什么叫绘制高度?比如说,布局高度是18.1,绘制时的高度一般是18,也有可能不是。这个时候就需要绘制高度。
绘制高度是怎么来的?绘制高度是因为像素是整数导致的。比如说行高18.1,从96开始绘制,5行之后的y坐标就是96+90.5。绘制时候显然不能是浮点像素,所以要四舍五入,就是96+91。如果考虑高度呢?情形就更加复杂了。根据尾数的不同,实际上有四种情形:
- 绘制高度,正常情形。y小数小于0.5,y+height小数小于0.5
- 绘制高度,正常情形。y小数大于0.5,y+height小数大于0.5
- 绘制高度,高度缩水。y小数大于0.5,y+height小数小于0.5
此时绘制高度缩水1个像素,由18变成17。
- 绘制高度,高度溢出。y小数小于0.5,y+height小数大于0.5
此时绘制高度溢出1个像素,由18变成19。
边栏推荐
- 案例分享|金融业数据运营运维一体化建设
- Personal understanding of convolutional neural network
- 技术分享 | 接口测试价值与体系
- 小程序 修改样式 ( placeholder、checkbox的样式)
- 2022 latest intermediate and advanced Android interview questions, [principle + practice + Video + source code]
- 怎么自动安装pythn三方库
- Common time complexity
- RedHat7.4配置yum软件仓库(RHEL7.4)
- 面试官:Redis 过期删除策略和内存淘汰策略有什么区别?
- Web3.0时代来了,看天翼云存储资源盘活系统如何赋能新基建(下)
猜你喜欢
AI表现越差,获得奖金越高?纽约大学博士拿出百万重金,悬赏让大模型表现差劲的任务
【Autosar 十四 启动流程详解】
5. 数据访问 - EntityFramework集成
企业级数据安全,天翼云是这样理解的
Summary of six points of MySQL optimization
2022 latest intermediate and advanced Android interview questions, [principle + practice + Video + source code]
Vulnhub's darkhole_ two
Find in MySQL_ in_ Detailed explanation of set() function usage
达梦数据库udf实现
Trust counts the number of occurrences of words in the file
随机推荐
Is it safe for golden sun to open an account? Can I open an account free of 5 in case?
Common time complexity
How to automatically install pythn third-party libraries
Emqx 5.0 officially released: a single cluster supports 100million mqtt connections
MySQL数据库索引教程(超详细)
怎么自动安装pythn三方库
sample_rate(采样率),sample(采样),duration(时长)是什么关系
【Autosar 十四 启动流程详解】
AI open2022 | overview of recommendation systems based on heterogeneous information networks: concepts, methods, applications and resources
SAP feature description
蚂蚁集团开源可信隐私计算框架「隐语」:开放、通用
Solutions contents have differences only in line separators
企业级数据安全,天翼云是这样理解的
7-1 linked list is also simple fina
ICML2022 | 长尾识别中分布外检测的部分和非对称对比学习
Use of websocket tool
Pytorch yolov5 training custom data
U-Net: Convolutional Networks for Biomedical Images Segmentation
5. Data access - entityframework integration
Icml2022 | partial and asymmetric comparative learning of out of distribution detection in long tail recognition