Repository navigation
[6020] 修复 64 位坐标升级遗漏:失效的 set_clipping/get_shadow 重写与残留 32 位截断点 - #4717
Merged
Merged
Conversation
- pdf_hummus/basic_renderer 的 set_clipping 升级为 DI:前者不再 override 导致 PDF 导出裁剪算子丢失(影响所有文档),后者隐藏基类 DI 版本并截断 qt 转发 - qt_proxy/qt_shadow_renderer 的 get_shadow 升级为 DI:恢复后备存储像素拷贝, 修复绘图模式重绘花屏 - typeset 变更区域链(editor/typesetter/edit_typeset)、apply_changes extents、 update_visible、invalidate、cursor_visible、set_extents、 get_typeset_content_height 等编辑器侧残留 SI 截断点升级为 DI - 命中测试链 find_box_path/find_child/find_any_child/distance/get_delta/ outside 全线 SI→DI - mupdf fetch、qt_simple_widget invalidate/重绘、get_mouse_position、 tm_button 尺寸提示的 SI 局部量升级为 DI - effect_point 恢复 floor(x+0.5) 舍入(原 as_int 语义),消除向零截断回退 - glue 生成器新增 di 标量类型映射,get-scroll-x/y 不再截断为 int; abs_round 增加 DI 重载,object_l1 补 TMSCM_ASSERT_DI Co-Authored-By: Claude <[email protected]>
- lolly 新增 MAX_DI/MIN_DI,替换 DI 累加器误用的 MAX_SI/MIN_SI 哨兵 (typeset 边界、各 find_child、composite/concat position) - find_child 命中循环消除重复 distance 调用,先做廉价的 accessible 判断 - glue 类型 di 走 object_l1.hpp 的 typedef DI di(沿用 array_di 惯例), build_glue.lua 不再需要 cpp_type_map 特例;TMSCM_ASSERT_DI 改为 TMSCM_ASSERT_INT 别名 - abs_round 改为 DI 实现 + SI 内联委派(沿用 round/inner_round 惯例), 移除无效的 friend 声明 - edit_interface 提取 scale_extents 公共计算,去除冗余 (double) 强转 - concat_animate 的 effect_point 复用 tm_round - pdf_hummus 的 to_x_double/to_y_double 入参升级为 DI Co-Authored-By: Claude <[email protected]>
Co-Authored-By: Claude <[email protected]>
typedef DI di 方案无误,恢复之。 Co-Authored-By: Claude <[email protected]>
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.
问题
#4715 将排版几何坐标升级为 64 位(SI→DI)后,code review 发现若干遗漏,其中两条影响所有尺寸的文档:
pdf_hummus_renderer_rep::set_clipping保持 SI 签名,不再 override 已升级的基类虚函数,显示路径的裁剪全部派发到基类版本——PDF 内容流中的 q/re/W/n 裁剪算子与 clip_level 簿记完全不执行,被裁内容溢出边界。qt_proxy_renderer_rep::get_shadow/qt_shadow_renderer_rep::get_shadow保持 SI 签名成为死代码,代理版特有的窗口后备存储像素拷贝丢失,stored位图未被填充即被 blit 回窗口。其余为超长文档(>2³¹ SI 单位)场景下残留的 32 位截断点。
修复
basic_renderer/pdf_hummus的set_clipping升级为 DI(pdf 侧to_x/to_y同步加宽)get_shadow升级为 DI,恢复像素拷贝editor.hpp虚函数、edit_typeset、typesetter_rep)、apply_changesextents、update_visible、invalidate、cursor_visible、set_extents、get_typeset_content_height的残留 SI 升级为 DIfind_box_path/find_child/find_any_child/find_accessible_child/find_scrolled_box_path/distance/get_delta/outside全线 SI→DI(含函数体内xx/yy/ex1/ex2/yhi/ylo等局部量)fetch、qt_simple_widget invalidate/重绘循环、get_mouse_position、tm_button尺寸提示的 SI 局部量升级为 DIeffect_point恢复floor(x+0.5)舍入(原as_int语义),修复(DI)向零截断引入的行为回退di标量类型映射(build_glue.lua),get-scroll-x/y不再截断为 int;abs_round增加 DI 重载;object_l1.hpp补TMSCM_ASSERT_DI测试
xmake b stem通过rounded_text_bg_test、env_length_test、line_breaker_test、table_performance_test全部通过🤖 Generated with Claude Code