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

推荐订阅源

月光博客
月光博客
IT之家
IT之家
Hugging Face - Blog
Hugging Face - Blog
J
Java Code Geeks
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
博客园 - 叶小钗
MyScale Blog
MyScale Blog
G
Google Developers Blog
Microsoft Azure Blog
Microsoft Azure Blog
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
大猫的无限游戏
大猫的无限游戏
博客园 - 三生石上(FineUI控件)
Google DeepMind News
Google DeepMind News
Engineering at Meta
Engineering at Meta
The Cloudflare Blog
Martin Fowler
Martin Fowler
酷 壳 – CoolShell
酷 壳 – CoolShell
N
Netflix TechBlog - Medium
MongoDB | Blog
MongoDB | Blog
I
InfoQ
WordPress大学
WordPress大学
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
H
Help Net Security

Martin Owens activity

Martin Owens deleted project branch average-color-divide at Inkscape / inkscape Fix divide-by-zero crash when using calligraphy tool (d34276f8) · Commits · Inkscape / inkscape · GitLab 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
Canvas rect pixel alignment improvements (!7849) · Merge ...
2026-04-15 · via Martin Owens activity

Canvas rect pixel alignment improvements

  • Review changes

  • Download

This is continuation of pixel alignment work started in !7798 (merged)

Main parts:

  • Canvas rectangle alignment
  • Canvas control handles
  • Add some tests for the pixel alignment code introduced previously and the new parts

Closes #6074

Rectangle changes primarily motivated by page border. Ideally if you have a canvas 100x100px canvas thats the size of white rectangle you should see at 100% zoom. The changes add some options for rect based canvas items to choose how the rectangle outline should be placed for each widget. In case of page border placing it on outside, in rest of the cases for now defaulting to center inside (center with bias towards inside in case of odd pixel width). In general case with arbitrary zoom/object size relationship relative to drawing pixels can be slightly inconsistent due to antialised pixels slightly peeking beyond rounded rectangle edge.

Some of the introduced utilities are also used for pixel snapping bounding box intervals on rulers.

One unintended side effect of changes is that page border looks darker due to being drawn on top of the infinite gray background instead of white page area.

Other major group of changes is canvas item handle icons. The changes should produce sharper non blurry versions of them. Did my best to keep the size as close as possible to the previous one. Also introduce optional flag for rounding towards specific dimension parity. Even width icon can't be properly centered on odd width lines. For now using this only for guide handle circles, matching their size parity with guide line width. With rest of the item handles the parity needs are less clear.

For circle handles I have made a bit of tradeoff in favor of smoother more incremental size change instead of attempting to pixel snap edge on the 4 cardinal directions. That might make circles with outlines slightly more blurry, but I think it's acceptable considering that most of the pixels along the curve of circle aren't going to be aligned with anything even if you align top/left/bottom/right sides.

Testing

Canvas border

  • Canvas size 1x perfect pixel scaling
  • Canvas size 2x perfect pixel scaling
  • Generic case (A4 1x and 2x)
  • Canvas edge weirdness at 2x scale before change
  • Shadow with and without rotation no OpenGL
  • Shadow with and without rotation with OpenGL

Canvas handle icons at 1x, 2x, 3x scaling, 3 versions of after - preferred size, forced even parity, forced odd parity.

Download and open in inkscape so that relevant parts can be inspected at suitable zoom level.

annotated_screenshots.svg

Raw screenshots for easier comparison of canvas item ctrl icons in image comparison tool of your choice. I found it most convenient to open them as layers in gimp with original version at the bottom and toggling visibility.

raw_screenshots.zip