D27909: Move barcode image scaling logic to AbstractBarcode

Volker Krause noreply at phabricator.kde.org
Sat Mar 7 12:23:59 GMT 2020


vkrause created this revision.
vkrause added a reviewer: svuorela.
Herald added a project: Frameworks.
Herald added a subscriber: kde-frameworks-devel.
vkrause requested review of this revision.

REVISION 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.

REPOSITORY
  R280 Prison

BRANCH
  pending

REVISION DETAIL
  https://phabricator.kde.org/D27909

AFFECTED FILES
  autotests/aztec/encoding/aztec-complete-big.png
  autotests/aztec/encoding/aztec-complete-compact1.png
  autotests/aztec/encoding/aztec-complete-compact3.png
  autotests/aztec/encoding/aztec-complete-compact4.png
  autotests/aztec/encoding/aztec-complete-full5.png
  autotests/aztecbarcodetest.cpp
  autotests/code128barcodetest.cpp
  src/lib/abstractbarcode.cpp
  src/lib/abstractbarcode.h
  src/lib/aztecbarcode.cpp
  src/lib/aztecbarcode.h
  src/lib/code128barcode.cpp
  src/lib/code39barcode.cpp
  src/lib/code93barcode.cpp
  src/lib/datamatrixbarcode.cpp
  src/lib/qrcodebarcode.cpp

To: vkrause, svuorela
Cc: kde-frameworks-devel, LeGast00n, cblack, GB_2, michaelh, ngraham, bruns
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20200307/1aa5e3ac/attachment.html>


More information about the Kde-frameworks-devel mailing list