summaryrefslogtreecommitdiff
path: root/oox/source/drawingml/shapegroupcontext.cxx
diff options
context:
space:
mode:
authorMike Kaganski <mike.kaganski@collabora.com>2022-06-15 18:33:38 +0300
committerMike Kaganski <mike.kaganski@collabora.com>2022-06-17 14:25:54 +0200
commit5772cef244dbee5834efbc693bc714d89ae6301d (patch)
tree136d4491c9cffc3638f29588a1bb4b3568a63648 /oox/source/drawingml/shapegroupcontext.cxx
parent4dab8afe89c57318cc7503ae051963de89a6cd25 (diff)
tdf#134210: Reimplement cropping from srcRect and fillRect
This avoids the scaling after the crop, since scaling is performed anyway when applying BitmapMode_STRETCH. This improves resulting bitmap quality. Also consider the "crop to zero" case (when the sum of cropped parts is equal to 100%). In that case, just use an empty graphic as the fill bitmap. This makes the differences between srcRect and fillRect processing explicit, simplifies the code, avoids extra rounding inaccuracies, and takes care of the edge cases that were considered in commit 2859ec288f2c1323ea3123d82cb1684b349ff598 Author Miklos Vajna <vmiklos@collabora.com> Date Wed Jun 15 15:52:18 2022 +0200 oox: fix div by zero in lclCalculateCropPercentage() The change in SdImportTest2::testTdf134210 is because we now don't scale the cropped image. The previous value was an interpolated color, while the new value is the actual color of pixel [0, 41] of the original image. Change-Id: I24fa9928cff32bcaa6a7b3e34def14700fddd7ca Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135917 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'oox/source/drawingml/shapegroupcontext.cxx')
0 files changed, 0 insertions, 0 deletions