Commit c0041fb
committed
FIX: when creating a canvas from a Figure use original dpi
When we upscale the DPI for high-dpi screens we stash the original dpi and then
set the figure dpi to the scaled version. If the same Figure instance is
repeatedly passed to a Canvas that support hi-dpi it would go into a loop where
the scaled DPI is treated as the original dpi and infinitely increases.
By grabbing `fig._original_dpi` (which we stash for exactly this reason) we can
avoid this loop.
closes matplotlib#263801 parent 1ab3332 commit c0041fb
2 files changed
+4
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1763 | 1763 | | |
1764 | 1764 | | |
1765 | 1765 | | |
1766 | | - | |
| 1766 | + | |
1767 | 1767 | | |
1768 | 1768 | | |
1769 | 1769 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3003 | 3003 | | |
3004 | 3004 | | |
3005 | 3005 | | |
3006 | | - | |
3007 | | - | |
3008 | 3006 | | |
3009 | | - | |
3010 | | - | |
3011 | | - | |
| 3007 | + | |
| 3008 | + | |
| 3009 | + | |
3012 | 3010 | | |
3013 | 3011 | | |
3014 | 3012 | | |
| |||
0 commit comments