惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
酷 壳 – CoolShell
酷 壳 – CoolShell
博客园_首页
Engineering at Meta
Engineering at Meta
量子位
A
About on SuperTechFans
阮一峰的网络日志
阮一峰的网络日志
Recent Announcements
Recent Announcements
博客园 - 司徒正美
V
Visual Studio Blog
H
Hackread – Cybersecurity News, Data Breaches, AI and More
The GitHub Blog
The GitHub Blog
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
F
Fortinet All Blogs
Martin Fowler
Martin Fowler
腾讯CDC
Jina AI
Jina AI
C
Check Point Blog
H
Help Net Security
罗磊的独立博客
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
V
V2EX
爱范儿
爱范儿
I
InfoQ

Martin Owens activity

Martin Owens deleted project branch average-color-divide at Inkscape / inkscape Fix divide-by-zero crash when using calligraphy tool (!7923) · Merge requests · Inkscape / inkscape · GitLab Add selection file to bypass Windows command length limits (correction) (865df7a5) · Commits · Inkscape / inkscape · GitLab Draft: Fix AppImage crashing during save on older distros (!7922) · Merge requests · Inkscape / inkscape · GitLab e71fa7f8e0858aab87b7fc0814a30a8c88da9b43 to fe225a6b9e1042c7221d95173be22a02b3725337 · Martin Owens / inkscape · GitLab 403 Forbidden on Inkscape web server (#693) · Issues · Inkscape / inkscape-web · GitLab 403 Forbidden on Inkscape web server (#13509) · Issues · Inkscape / Inbox · GitLab Add selection file to bypass Windows command length limits (correction) (!7917) · 合并请求 · Inkscape / inkscape · GitLab Non-vertical axonometric axis implementation (!7912) · Merge requests · Inkscape / inkscape · GitLab Update split mode on tab switch (!7915) · Merge requests · Inkscape / inkscape · GitLab inset/offset as app functions so they can be used from CLI (!7914) · Merge requests · Inkscape / inkscape · GitLab Performace regresion in last month (#5879) · Issues · Inkscape / inkscape · GitLab [Regression] Right-aligned text has a new gap in 1.4.4 (#6130) · Issues · Inkscape / inkscape · GitLab [Regression] Right-aligned text has a new gap in 1.4.4 (#13498) · Issues · Inkscape / Inbox · GitLab c503804e014994d611de1b225bee8158c06448a8 to a4588d8ead1e7049b90c5a126962746ed286ab17 · Inkscape / inkscape-web · GitLab Validate the extensions of signature file uploads (a4588d8e) · 提交 · Inkscape / inkscape-web · GitLab Allow color conversions using static arrays instead of just vectors (e71fa7f8) · 提交 · Martin Owens / inkscape · GitLab Speed up ungroup on thousands of items (!7908) · Merge requests · Inkscape / inkscape · GitLab Incorrect handling of FontMatrix and transformation matrices with internal PDF import (#4845) · Issues · Inkscape / inkscape · GitLab Handling edge case of negative fonts in PDF (59040229) · 提交 · Inkscape / inkscape · GitLab Handling edge case of negative fonts in PDF (!7911) · 合并请求 · Inkscape / inkscape · GitLab Allow color conversions using static arrays instead of just vectors (33e65d1b) · Commits · Martin Owens / inkscape · GitLab Allow color conversions using static arrays instead of just vectors (9be5f867) · Commits · Martin Owens / inkscape · GitLab a9672ea1dff483b5b3aa8c6b5d88cd223001bef5 to 512a5e57602ac52e1d35782a7dcebae04262b2b8 · Martin Owens / inkscape · GitLab Add selection file to bypass Windows command length limits (!7905) · 合并请求 · Inkscape / inkscape · GitLab Revert Pango label changes (1.4.x) (!7907) · 合并请求 · Inkscape / inkscape · GitLab Crash on selecting a `<text>` object without a `<tspan>` inside (#5462) · Issues · Inkscape / inkscape · GitLab Fix breakage with Ubuntu 26.04 CI (!7904) · 合并请求 · Inkscape / inkscape · GitLab c673fdd5148253276826d4eda3951daaefb82607 to 356b31383ba324396a225686613236484305533d · Martin Owens / inkscape · GitLab Revert Text tool cursor changes (1.4.x) (!7903) · 合并请求 · Inkscape / inkscape · GitLab
1.4.x (!8012) · Merge requests · Inkscape / inkscape · Gi...
Martin Owens · 2026-06-27 · via Martin Owens activity

1.4.x

  • Review changes

  • Download

Add PATH_SPLIT mode to the Eraser Tool

What this does

This MR adds a new eraser mode called PATH_SPLIT, accessible via the eraser tool's mode selector in the toolbar. It is modeled on the path eraser tool from Macromedia Freehand, which many technical illustrators relied on heavily.

Unlike the existing CUT mode (which performs boolean difference operations on filled shapes), PATH_SPLIT works directly with lib2geom path intersections to split open or closed paths at the eraser stroke boundary, preserving both sides of the split as a single SVG path element with multiple subpaths.

Why it's useful

For technical illustration work (patent drawings, engineering diagrams, etc.), the dominant workflow involves open stroked paths rather than filled shapes. The existing CUT mode doesn't serve this use case well. PATH_SPLIT makes it possible to precisely trim and split paths the way a drafter would — draw across a line to cut it, with both pieces surviving.

How it works

  • The eraser stroke is captured as a PathVector via the existing DynamicBase engine
  • Intersection PathTimes between the eraser stroke and each target path are computed via lib2geom's intersect()
  • The target path is split at those intersection points
  • Each resulting segment is tested with a winding number check to determine if it falls inside the eraser shape
  • Segments inside the eraser are discarded; segments outside are preserved
  • The surviving segments are written back to the original SVG path element
  • If all segments are erased, the element is deleted
  • Selection is preserved after the erase stroke, so multiple distinct erases can be made on the same selection without reselecting

Files changed

  • src/ui/tools/eraser-tool.cpp — core implementation
  • src/ui/tools/eraser-tool.h — declarations
  • share/ui/toolbar-eraser.ui — toolbar mode selector updated to include PATH_SPLIT

Known limitations / future work

  • Non-path shapes (rectangles, ellipses) must be converted to paths first (Object to Path, Ctrl+Shift+C) before PATH_SPLIT can operate on them. Auto-conversion is a planned improvement.
  • Brush preview / cursor feedback is inherited from the existing eraser tool behavior and could be improved with a real-time circular preview.

Notes on development

This feature was developed by Aaron Johnson, a professional patent illustrator who uses Inkscape daily. Claude LLM generated the code from prompts. Aaron has a programming background but C++ and the Inkscape codebase are outside his usual expertise. He is happy to answer questions and work through any requested changes.

Edited by Aaron Johnson