Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MyBaseLayout设置bottomBorderline 线太细导致的闪烁问题 #38

Closed
bicyclering opened this issue May 31, 2017 · 1 comment
Closed

Comments

@bicyclering
Copy link
Collaborator

2017-05-20 14_15_00

layout.bottomBorderline.thick = 1.f / scale
@youngsoft 大哥的解答:
因为是这样的。如果你设置0.5的话。我这边会按0.5/2的位置来开始展示。但是因为高清屏的位置必须是0.5的倍数,所以导致转化为像素时就有可能无法正确显示。
比如我的底部的高度是5。你如果设置为了0.5的话那么就是从 4.75 - 5.25 这个区域来绘制边界线。
这样因为4.75这个位置是没法有物理像素的位置对应的。所以就抖了

youngsoft pushed a commit that referenced this issue May 31, 2017
2.  Fix #37 , #38
3. Support carthage
@youngsoft
Copy link
Owner

youngsoft commented May 31, 2017

您好! 这个问题已经在新发布的1.3.8版本中进行了修复。原因就是当布局的边界线对象MyBorderline的粗细属性thick值小于1时且这个值小到无法用最小一个物理像素来绘制时将会产生闪烁和抖动的现象。因此新版本里面将thick的定义改变为了物理像素为单位,最小值为1。如果您设置的值小于1则系统会默认置为1。同时通过对thick属性的概念定义为像素也解决了不同物理分辨率下的粗细不一致的问题,您只要设置同样的值就在不同分辨率的设备下显示的线的粗细都是一致的了。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants