Repository navigation
[6239] 修复页间隙出现白色横条 - #4772
Merged
Merged
[6239] 修复页间隙出现白色横条#4772
Conversation
make_pages 计算行/列偏移时减去的是本行(列)页盒尺寸而非上一行(列)。 issue 1260 将首行上衬边、末行下衬边置 0 后,首行高度比中间行少 10px, 第 2 行页面被多推下 10px,页 1 边框盒底部与页 2 边框盒顶部之间露出 10px 画布白底,即页与页之间的白色横条。改为按上一行(列)尺寸累加。
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
问题
paper 模式下,第 1、2 页之间的灰色页间隙中出现一条 10px 高的白色横条(横跨整个排版盒宽度)。
根因
pager_rep::make_pages()计算页盒摆放位置时,行偏移yy[j]减去的是本行页盒的高度,而非上一行页盒的高度(列偏移xx[i]同理)。历史上所有页盒高度一致,两者数值相同,错误不可见。issue 1260 的修复将首行上衬边、末行下衬边置 0 后,首行高度比中间行少
10*pixel,于是:修复
行/列偏移改为按**上一行(列)**的页盒尺寸累加。等尺寸场景行为与原实现完全一致。
复现与验证