Skip to content
Snippets Groups Projects

qml: optimize soft edges depending on size in RoundImage

Merged Fatih Uzunoğlu requested to merge fuzun/vlc:qt/roundimagesoftedgeadjustment into master

The edges (-0.01, 0.01) seem to cover most of the images used in the interface. But for extraordinary sizes, too small or too big, adjusting the parameters seem to provide better anti-aliasing. The interface displayed round image sizes seem to vary between roughly (32, 32) and (550, 340) at the moment.

I found 1 / size to be yielding good results for a span of different sizes. In normal case, if we assume size to be 100 (minimum of width and height), then it is essentially the same as the value used before 0.01. I have also checked with the smallest and the largest images displayed in the interface.

As per the function 1 / x, the deviation can be expected to be in the order of 10^1 (0.002 and 0.2), considering the rounded rectangular image sizes displayed in the interface. This means that such function would not cause issues with regard to precision.

Request review @chub.

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • Loading
  • Loading
  • Loading
  • Loading
Please register or sign in to reply
Loading