Move barcode image scaling logic to AbstractBarcode
ClosedPublic

Authored by vkrause on Mar 7 2020, 12:23 PM.

Details

Summary

This removes any kind of scaling from the specific implementations, they
now truly report the bare minimum size needed, as well as a corresponding
image. AbstractBarcode scales this to the requested size, and, for now,
adds the previous magic numbers to the minimum size.

This is a further step towards allowing applications full control over
scaling for properly handling high DPI scenarios.

There's two noteworthy behavior changes in this:

  • minimumSize() now also works before calling toImage() for the first time.
  • toImage() returns valid results down to the actual minimum size, not only

to what minimumSize() reports.

Diff Detail

Repository
R280 Prison
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
vkrause created this revision.Mar 7 2020, 12:23 PM
Restricted Application added a project: Frameworks. · View Herald TranscriptMar 7 2020, 12:23 PM
Restricted Application added a subscriber: kde-frameworks-devel. · View Herald Transcript
vkrause requested review of this revision.Mar 7 2020, 12:23 PM
svuorela accepted this revision.Mar 8 2020, 4:26 PM
This revision is now accepted and ready to land.Mar 8 2020, 4:26 PM
This revision was automatically updated to reflect the committed changes.