Commit e6ae60c
authored
fix(PrintControl): make DPI scale the export in fit mode (#93)
In the default 'fit' page mode the export canvas was always the on-screen
map canvas size, so changing the DPI had no effect on the output — the
exported image (and its file size) was identical regardless of the chosen
DPI, even though the DPI control stayed enabled.
Treat DPI as a resolution multiplier relative to the 96 DPI baseline in fit
mode (pageW = baseW * dpi / 96), matching how paper presets already scale,
and report the chosen density in the PNG/JPEG/PDF/SVG metadata via
_effectiveDpi(). The physical size stays the base size at 96 DPI, so only
the pixel count — and therefore the file size — grows with DPI.
Bumps version to 0.20.1.1 parent 91dd304 commit e6ae60c
3 files changed
Lines changed: 20 additions & 13 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
953 | 953 | | |
954 | 954 | | |
955 | 955 | | |
956 | | - | |
957 | | - | |
| 956 | + | |
| 957 | + | |
958 | 958 | | |
959 | 959 | | |
960 | 960 | | |
961 | 961 | | |
962 | | - | |
963 | 962 | | |
964 | 963 | | |
965 | 964 | | |
| |||
1637 | 1636 | | |
1638 | 1637 | | |
1639 | 1638 | | |
1640 | | - | |
1641 | | - | |
| 1639 | + | |
| 1640 | + | |
| 1641 | + | |
| 1642 | + | |
| 1643 | + | |
| 1644 | + | |
1642 | 1645 | | |
1643 | | - | |
1644 | | - | |
| 1646 | + | |
| 1647 | + | |
| 1648 | + | |
| 1649 | + | |
| 1650 | + | |
| 1651 | + | |
1645 | 1652 | | |
1646 | 1653 | | |
1647 | 1654 | | |
1648 | 1655 | | |
1649 | 1656 | | |
1650 | 1657 | | |
1651 | 1658 | | |
1652 | | - | |
1653 | | - | |
1654 | | - | |
| 1659 | + | |
| 1660 | + | |
1655 | 1661 | | |
1656 | 1662 | | |
1657 | 1663 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3212 | 3212 | | |
3213 | 3213 | | |
3214 | 3214 | | |
3215 | | - | |
3216 | | - | |
| 3215 | + | |
| 3216 | + | |
| 3217 | + | |
3217 | 3218 | | |
3218 | 3219 | | |
3219 | 3220 | | |
| |||
0 commit comments