Skip to content

Conversation

@amartya4256
Copy link
Contributor

This PR adds the documentation about SWT's new Coordinate system which aids to the monitor specific scaling on windows.

@amartya4256 amartya4256 linked an issue Jan 27, 2026 that may be closed by this pull request
@amartya4256 amartya4256 force-pushed the amartya4256/coordinate_system_documentation branch from 597134b to 4caea9a Compare January 27, 2026 15:15
This Commit adds the documentation about SWT's new Coordinate system
which aids to the monitor specific scaling on windows.
@amartya4256 amartya4256 force-pushed the amartya4256/coordinate_system_documentation branch from 4caea9a to 1a6a6e1 Compare January 27, 2026 15:32
@github-actions
Copy link
Contributor

Test Results

  176 files  ±0    176 suites  ±0   27m 47s ⏱️ - 3m 6s
4 680 tests ±0  4 658 ✅ ±0  22 💤 ±0  0 ❌ ±0 
  485 runs  ±0    479 ✅ ±0   6 💤 ±0  0 ❌ ±0 

Results for commit 1a6a6e1. ± Comparison against base commit 3ccbe91.

Copy link
Contributor

@HeikoKlare HeikoKlare left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Having documentation of the coordinate system specifics is a good idea. Thank you.

The current text more sounds like an experience report / article than a documentation of results. It also does align with the terminology in the rest of the documentation. Can we align that?
As an example, the documentation introduced the "static" and the "dynamic" HiDPI support, for which the different coordinate system apply. So explaining the relation between those terms of the different coordinate system would be helpful. Actually, the current description is not completely correct in that regard, as it states that when all monitors have the same zoom, the SingleZoomCoordinateSystemMapper is used, but it only depends on the used HiDPI mode and not on the zooms of the monitors.

The images are also quite nice, but in my opinion they would be more helpful if they reflected how the coordinate systems actually work and not how a wrong coordinate system would look like.


SWT addresses this challenge with two coordinate system mappers:

**`MultiZoomCoordinatesSystemMapper`** (used when monitors have different zoom levels):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

MultiZoomCoordinateSystemMapper

**`MultiZoomCoordinatesSystemMapper`** (used when monitors have different zoom levels):
- **Top-left position:** Stored in absolute pixels to preserve monitor boundaries
- **Width and height:** Stored in points, adjusted for the monitor's zoom factor
- **MontiorAwareRectangle and MonitorAwarePoint:** To deal with the ambiguity, all the rectangles and points created by the mapper are monitor-aware.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

MonitorAwareRectangle

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.

Add Coordinate System Documentation

2 participants