Skip to content

Feature/macos screenshot - #18

Merged
lzx8589561 merged 2 commits into
ZToolsCenter:mainfrom
Particaly:feature/macos-screenshot
Sep 1, 2026
Merged

Feature/macos screenshot#18
lzx8589561 merged 2 commits into
ZToolsCenter:mainfrom
Particaly:feature/macos-screenshot

Conversation

@Particaly

Copy link
Copy Markdown
Contributor

截图功能同步mac端实现,并修复了win端高分屏下长截图工具栏UI尺寸问题

- 新增 macOS 截图完整实现(Swift):选区/窗口吸附、编辑标注、马赛克、
  长截图、圆角导出、保存对话框,行为与 Windows 版对齐
- 截图模块重构为 src/screenshot/{windows,macos,algo} 三层目录,
  长截图拼接算法独立为平台无关的 algo 模块
- setClipboardFiles 支持 macOS;ScreenCapture.start 返回选区坐标与
  错误信息,base64 结果带 data URL 前缀;长截图取消帧数上限
- 同步更新 binding.gyp、build-swift.sh、CI 构建流程与 README/DEPLOY 文档
PMv2 捕获线程下 GetSystemMetrics 已返回物理像素,dpiScale = physVw/vw
恒为 1,工具栏/面板界面尺寸乘它导致高分屏下保持 96 DPI 尺寸(过小)。
新增 LongCaptureContext.uiScale(GetDpiForSystem/96,与编辑态
CalcToolbarMetrics 同源):工具栏窗口/布局/图标/tooltip 与面板窗口/
内边距/圆角等界面 chrome 一律改用 uiScale;内容几何换算(rows/ds
标签、物理采样偏移、预览显示尺寸)保持 dpiScale 不变。

macOS 端 UI 以 point 布局、系统按 backing scale 自动渲染,无此问题。
@lzx8589561
lzx8589561 merged commit 98714fc into ZToolsCenter:main Sep 1, 2026
3 checks passed
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

Successfully merging this pull request may close these issues.

2 participants