forked from jurplel/qView
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* getContentRect now returns QRect because in practice, GraphicsView always snaps to whole pixels when displaying. This also prevents use of getContentRect().size().toSize() which can in theory round differently than getContentRect().toRect().size() (probably not in practice since we don't translate by fractional amounts), so this forces rounding to happen the same way it will end up getting displayed. * isExpensiveScalingRequested shouldn't use getContentRect because the current pixmap may already have been scaled expensively and have some rounding errors built in. We only want to take the the future pixmap into account, the size of which will be recalculated from ideal values. * Increase the error tolerance slightly for expensive scaling (even though it probably doesn't need it now?) because there's no downside if the threshold is a tad high, but if it's too low we'll miss scaling a fitted image.
- Loading branch information
Showing
2 changed files
with
16 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters