summaryrefslogtreecommitdiff
path: root/canvas
AgeCommit message (Collapse)Author
2025-01-13Fix dxcanvas::DeviceHelper::getPhysicalResolutionMike Kaganski
XGraphicDevice::getPhysicalResolution returns pixel per millimeter (offapi/com/sun/star/rendering/XGraphicDevice.idl). The claculation was wrong (multiplying by 25.4 instead of dividing) since commit 3161cf3741e045092d342f9752b61b9b36eee056 (INTEGRATION: CWS dxliberate01 (1.1.2); FILE ADDED, 2027-11-01). Change-Id: I92f33347d48c48c37d02c767fcadcf35d1271e3f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/180152 Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> Tested-by: Jenkins
2025-01-11make the ScanlineFormat values more explicitNoel Grandin
instead of cleverly deciding that one format is actually another format, depending on the current state of the supportsBitmap32() call, just have explicit values that say what the actual format is. This patch should have no functional affect, but will make upcoming patches simpler. Change-Id: I07f127a3e36800aa4cee034261c2e1216d8e8da1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/180089 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Jenkins
2024-12-03tdf#158068 Replace string literals with OUString literals in canvasanonymotter
Change-Id: I7bbcc08786843d6d289b3170248ce2696e57f3b2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177602 Reviewed-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org> Tested-by: Jenkins
2024-11-19canvas: simplify calcTransformedRectBoundsXisco Fauli
Change-Id: Ia0314a985ae2183727587ad254faec12ee49b66c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176769 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2024-11-19canvas: simplify calcRectToOriginTransformXisco Fauli
Change-Id: I851d9d11c9d3f3c34353913a146ad168a98dc3d5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176771 Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org> Tested-by: Jenkins
2024-11-19canvas: simplify getViewStateTransform/getRenderStateTransformXisco Fauli
Change-Id: If9487aff0d80f7ee9d368cd97bc2828a856cc392 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176766 Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org> Tested-by: Jenkins
2024-11-19improve loplugin passparamsbyrefNoel Grandin
I think I managed to disable this when I converted it to use the shared plugin infrastructure. So fix that, and then make it much smarter to avoid various false positives. Change-Id: I0a4657cff3b40a00434924bf764d024dbfd7d5b3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176646 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-11-11clang-tidy: performance-unnecessary-copy-initialization in canvasNoel Grandin
Change-Id: I1d08cfe979529614ab2c66702c33a9045b026f23 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176391 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-11-10com::sun::star -> cssMike Kaganski
Change-Id: I890ec73e30d3cc6b210903ecee29431f3cb5f635 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175979 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2024-11-08loplugin:reftotemp in canvasNoel Grandin
Change-Id: I0a038cf32e05dab59b1cedcf06ecd38b48d76feb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176257 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-11-07loplugin:passstuffbyref in avmedia..canvasNoel Grandin
Change-Id: I916a6431eb0720af16dcb5aa46b758f92dbe4ec4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176179 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-11-02tdf#163486: PVS: Identical branchesBogdan Buzea
Change-Id: I65edd548d9ed4fbc5589f354280dbfb90e2a9064 V1037: Two or more case-branches perform the same actions. Check lines: 171, 177 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175148 Tested-by: Jenkins Reviewed-by: David Gilbert <freedesktop@treblig.org>
2024-10-31convert KernArray from sal_Int32 to doubleNoel Grandin
which allows us to eliminate a bunch of rounding at various layers, and consequently maintain a lot more precision Change-Id: I911dedd7c041c1d67396c082e5695346ea689acb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175814 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-10-21vcl: move bitmap filter headers into vcl/bitmap global header directoryChris Sherlock
Use #pragma once instead of header guards Change-Id: Iba43f2103628ed184933cf2611991e7aef9f0173 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173369 Reviewed-by: Tomaž Vajngerl <quikee@gmail.com> Tested-by: Jenkins
2024-09-25tdf#163145: revert commit 6f224a17dbf635319503a81ce4038b1ae2ad6de0Mike Kaganski
I can't reproduce the problem from tdf#136933 anymore (using kf5 and qt5), while it's reproducible using v.7.0 bibisect repo with qt5. I conclude, that the problem got resolved in the meanwhile. So it seems to make sense to just revert the problematic commit. The incorrect line drawing still may need to be fixed eventually. There seem to be no way to test SlideImpl::getCurrentSlideBitmap, which eventually calls CanvasHelper::strokePolyPolygon. So this change has no unit test, unfortunately. Change-Id: I1d82b6f734a4f69d93c9d61732f55ef8158cfbe6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173933 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2024-08-16cid#1557618 COPY_INSTEAD_OF_MOVECaolán McNamara
and cid#1557535 COPY_INSTEAD_OF_MOVE cid#1557520 COPY_INSTEAD_OF_MOVE cid#1557513 COPY_INSTEAD_OF_MOVE cid#1557503 COPY_INSTEAD_OF_MOVE cid#1557487 COPY_INSTEAD_OF_MOVE cid#1557483 COPY_INSTEAD_OF_MOVE cid#1557479 COPY_INSTEAD_OF_MOVE cid#1557474 COPY_INSTEAD_OF_MOVE cid#1557461 COPY_INSTEAD_OF_MOVE cid#1557446 COPY_INSTEAD_OF_MOVE cid#1557445 COPY_INSTEAD_OF_MOVE cid#1557441 COPY_INSTEAD_OF_MOVE cid#1557435 COPY_INSTEAD_OF_MOVE cid#1557433 COPY_INSTEAD_OF_MOVE cid#1557429 COPY_INSTEAD_OF_MOVE cid#1557375 COPY_INSTEAD_OF_MOVE cid#1557372 COPY_INSTEAD_OF_MOVE cid#1557356 COPY_INSTEAD_OF_MOVE cid#1557350 COPY_INSTEAD_OF_MOVE cid#1557344 COPY_INSTEAD_OF_MOVE cid#1557339 COPY_INSTEAD_OF_MOVE cid#1557332 COPY_INSTEAD_OF_MOVE cid#1557330 COPY_INSTEAD_OF_MOVE cid#1557328 COPY_INSTEAD_OF_MOVE cid#1557323 COPY_INSTEAD_OF_MOVE cid#1557315 COPY_INSTEAD_OF_MOVE cid#1557313 COPY_INSTEAD_OF_MOVE cid#1557304 COPY_INSTEAD_OF_MOVE cid#1557297 COPY_INSTEAD_OF_MOVE cid#1557291 COPY_INSTEAD_OF_MOVE cid#1557290 COPY_INSTEAD_OF_MOVE cid#1557271 COPY_INSTEAD_OF_MOVE cid#1557266 COPY_INSTEAD_OF_MOVE cid#1557262 COPY_INSTEAD_OF_MOVE cid#1557259 COPY_INSTEAD_OF_MOVE cid#1557246 COPY_INSTEAD_OF_MOVE cid#1557242 COPY_INSTEAD_OF_MOVE cid#1557241 COPY_INSTEAD_OF_MOVE cid#1557236 COPY_INSTEAD_OF_MOVE cid#1557228 COPY_INSTEAD_OF_MOVE cid#1557225 COPY_INSTEAD_OF_MOVE cid#1557221 COPY_INSTEAD_OF_MOVE cid#1557217 COPY_INSTEAD_OF_MOVE cid#1557213 COPY_INSTEAD_OF_MOVE cid#1557211 COPY_INSTEAD_OF_MOVE cid#1557209 COPY_INSTEAD_OF_MOVE cid#1557205 COPY_INSTEAD_OF_MOVE cid#1557204 COPY_INSTEAD_OF_MOVE cid#1557193 COPY_INSTEAD_OF_MOVE cid#1556082 COPY_INSTEAD_OF_MOVE Change-Id: I07f195a79a69d4bac0d14317854efc88d6fe94d7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/171927 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-08-06cid#555593 COPY_INSTEAD_OF_MOVECaolán McNamara
and cid#1555849 COPY_INSTEAD_OF_MOVE cid#1555936 COPY_INSTEAD_OF_MOVE cid#1555951 COPY_INSTEAD_OF_MOVE cid#1555955 COPY_INSTEAD_OF_MOVE cid#1555960 COPY_INSTEAD_OF_MOVE cid#1555964 COPY_INSTEAD_OF_MOVE cid#1555965 COPY_INSTEAD_OF_MOVE cid#1555975 COPY_INSTEAD_OF_MOVE cid#1555979 COPY_INSTEAD_OF_MOVE cid#1555987 COPY_INSTEAD_OF_MOVE cid#1555990 COPY_INSTEAD_OF_MOVE cid#1555991 COPY_INSTEAD_OF_MOVE cid#1556002 COPY_INSTEAD_OF_MOVE cid#1556008 COPY_INSTEAD_OF_MOVE cid#1556011 COPY_INSTEAD_OF_MOVE cid#1556015 COPY_INSTEAD_OF_MOVE cid#1556017 COPY_INSTEAD_OF_MOVE cid#1556023 COPY_INSTEAD_OF_MOVE Change-Id: I8ab99d8e52a1780173a4272c59d408432c29de9f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/171572 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-07-31cid#1555587 COPY_INSTEAD_OF_MOVECaolán McNamara
and cid#1555589 COPY_INSTEAD_OF_MOVE cid#1555593 COPY_INSTEAD_OF_MOVE cid#1555596 COPY_INSTEAD_OF_MOVE cid#1555602 COPY_INSTEAD_OF_MOVE cid#1555608 COPY_INSTEAD_OF_MOVE cid#1555610 COPY_INSTEAD_OF_MOVE cid#1555620 COPY_INSTEAD_OF_MOVE cid#1555623 COPY_INSTEAD_OF_MOVE cid#1555625 COPY_INSTEAD_OF_MOVE cid#1555626 COPY_INSTEAD_OF_MOVE cid#1555634 COPY_INSTEAD_OF_MOVE cid#1555638 COPY_INSTEAD_OF_MOVE cid#1555667 COPY_INSTEAD_OF_MOVE cid#1555682 COPY_INSTEAD_OF_MOVE cid#1555686 COPY_INSTEAD_OF_MOVE cid#1555702 COPY_INSTEAD_OF_MOVE cid#1555710 COPY_INSTEAD_OF_MOVE cid#1555750 COPY_INSTEAD_OF_MOVE cid#1555752 COPY_INSTEAD_OF_MOVE cid#1555761 COPY_INSTEAD_OF_MOVE cid#1555762 COPY_INSTEAD_OF_MOVE cid#1555771 COPY_INSTEAD_OF_MOVE cid#1555772 COPY_INSTEAD_OF_MOVE cid#1555784 COPY_INSTEAD_OF_MOVE cid#1555785 COPY_INSTEAD_OF_MOVE Change-Id: Ib9724230c05b2027b4edf64e6a0bb5e22a270a88 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/171274 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-05-18cid#1598237 Uncaught exceptionCaolán McNamara
Change-Id: Iab0a585048d028fda27a8b3edaad666edd0f55b3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167796 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-05-15use more officecfg in CanvasFactoryNoel Grandin
Change-Id: I3d2b09a0e951a7901af85108537485fdea1dbc43 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167640 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-05-12Drop some uses of css::uno::Sequence::getConstArrayMike Kaganski
where it was obsoleted by commits 2484de6728bd11bb7949003d112f1ece2223c7a1 (Remove non-const Sequence::begin()/end() in internal code, 2021-10-15) and fb3c04bd1930eedacd406874e1a285d62bbf27d9 (Drop non-const Sequence::operator[] in internal code 2021-11-05). Change-Id: I64683093afc48ddf2307dc1dee2302cf0b3cbecc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167110 Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> Tested-by: Jenkins
2024-05-06loplugin:ostr in canvasNoel Grandin
Change-Id: I6fe0ed24a42394936975e763aba9dc3625a373ce Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167205 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-04-30WaE: C6011 Dereferencing NULL pointer warningsCaolán McNamara
Change-Id: I498c10e8bc134b41e3606d8a05cf3103a9274735 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166937 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-04-29Drop uses of css::uno::Sequence::getConstArray in canvas .. connectivityMike Kaganski
where it was obsoleted by commits 2484de6728bd11bb7949003d112f1ece2223c7a1 (Remove non-const Sequence::begin()/end() in internal code, 2021-10-15) and fb3c04bd1930eedacd406874e1a285d62bbf27d9 (Drop non-const Sequence::operator[] in internal code 2021-11-05). Change-Id: I9467028fd1a7eeafad7f0dd776a91a9a40770b48 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166816 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2024-04-15Generalize basegfx::fround for templated return typeMike Kaganski
And use it when assigning to tools::Long Change-Id: I0814d7bac9cdd48191ba69c64e3b12a4973b3417 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166071 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2024-03-30convert CanvasFont to comphelper::WeakComponentImplHelperNoel Grandin
Change-Id: I91aab0365aa57670d484228797f97a2675894cd4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165573 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-03-14tdf#141908 - CppUnittests: replace usage of sal_Int32 with colorsRafał Dobrakowski
Conversion of hex/dec colour notation (example entry Color( 255, 255, 255), Color(0xFFFFFF) - COL_WHITE) For the other available colour definitions. Change-Id: I9eed0cd64adcbc8d25e1c22143a000906a457586 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163729 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2024-02-08canvas : use more OUString literalsArnaud VERSINI
Change-Id: I539e1e6d04299154bfe1ad2cf0362bdf3d96537b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163051 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2024-01-15tdf#156830: fix faulty transformation order in cairo canvas for patternsSarper Akdemir
Change-Id: Ib58e845c23dd14bbc3b96e5549a722b650d593a6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162069 Tested-by: Jenkins Reviewed-by: Sarper Akdemir <sarper.akdemir.extern@allotropia.de>
2024-01-12cid#1546414 COPY_INSTEAD_OF_MOVECaolán McNamara
and cid#1546408 COPY_INSTEAD_OF_MOVE cid#1546367 COPY_INSTEAD_OF_MOVE cid#1546283 COPY_INSTEAD_OF_MOVE cid#1546268 COPY_INSTEAD_OF_MOVE Change-Id: I8b6067f70bc0e8cce7117bb3f366227add279887 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161964 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-01-02tdf#145538 Use range based for loopsLuv Sharma
Change-Id: I0f028d48ccad4e1420e043eb0ab8aeab88ed0b88 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161533 Tested-by: Hossein <hossein@libreoffice.org> Reviewed-by: Hossein <hossein@libreoffice.org>
2023-12-30move IsFuzzing to comphelperCaolán McNamara
and try something a bit more generic Change-Id: I1d8256576cd02f0a589df350ba7b53059dd586a5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161250 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2023-12-07simplify and modernise ScopedBitmapAccessNoel Grandin
(*) Make all of it use a "Scoped" paradigm (*) pass by value, no need to allocate on heap (*) make all of the construction go via the *Access constructors, instead of it being some via the constructors and some via the Acquire*Access methods. (*) take the Bitmap& by const& in the constructor, so we can avoid doing const_cast in random places. Change-Id: Ie03a9145c0965980ee8df9a89b8714a425e18f74 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160293 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-11-20Extended loplugin:ostr: canvasStephan Bergmann
Change-Id: I7c5ee1eb15a4464c9dfc2e292df3e6adf71d3956 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159726 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-11-18c++20: use std::erase instead of std::removed followed by erase (part 2)Julien Nabet
Change-Id: I0222f0f53f387dd57bd674b1e137b53487f4e1d3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159611 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2023-11-17c++20: use std::erase instead of std::removed followed by eraseJulien Nabet
See https://en.cppreference.com/w/cpp/container/vector/erase2 Change-Id: I26744e74b34d1efa1524a1f88aa3af9e153bc9ee Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159515 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2023-10-25tdf#157790 invert alpha maskPatrick Luby
Due to commit 81994cb2b8b32453a92bcb011830fcb884f22ff3, the alpha mask needs to be inverted. Change-Id: I4771c5f6f3a08fb210b62a0533df895a4a476058 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158410 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-10-11Drop o3tl::span, can use C++20 std::span directly nowStephan Bergmann
Change-Id: Ic21ff7bf48f07f7277979d52e99d2c5c268de83f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157825 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-09-21tdf#146619 Recheck include/basegfx with IWYUGabor Kelemen
Change-Id: I08dad6ceeaa9e5470491c09f06d819c4c27ec5f3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156983 Tested-by: Jenkins Reviewed-by: Gabor Kelemen <kelemeng@ubuntu.com>
2023-09-02replace set(nullptr) with clear()Noel Grandin
It's a little easier to read, but mostly it makes an upcoming loplugin easier to implement Change-Id: I4ae7db8eda77795dab3255d1afd8ba4f20a8de76 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156451 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-08-19loplugin: new global analysis locking2Noel Grandin
look for methods where we don't need to guard access to the field, because the field is never modified Change-Id: I62c33cc3f52881557515765d3733c4afc78547aa Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155836 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-08-16tdf#144073 and tdf#147645: use bounds and angle for gradientPatrick Luby
Passing an expanded, rotated polygon noticeably modifies the drawing of the gradient in a slideshow due to moving of the starting and ending colors far off the edges of the drawing surface. So try another way and set the angle of the gradient and draw only the unadjusted bounds. Change-Id: I95441dfa3215396d5bc7edfa9f985335480b37de Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155729 Tested-by: Jenkins Reviewed-by: Patrick Luby <plubius@neooffice.org>
2023-08-13Revert "clang-tidy bugprone-parent-virtual-call in canvas"Noel Grandin
This reverts commit eb6110aae0af9e27f71dac95274b8f3879090deb. There are some odd things gone in with some of these changes that I do understand. Reverting until I have worked it out. Change-Id: I3856b878cfaa6fd1b282a473965b2ec68779a616 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155597 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-08-11clang-tidy bugprone-parent-virtual-call in canvasNoel Grandin
Change-Id: Ibaaec56e7cb42d113be07bb719de3534de24833c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155615 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-08-06tdf#156540 invert alpha mask when drawing spritesThorsten Behrens
Due to the switch from transparency to alpha in commit 81994cb2b8b32453a92bcb011830fcb884f22ff3, a sprite's alpha mask needs to be inverted. Additionally, fixes an oversight in vcl's alpha.cxx, where manual blend math got mangled, also in 81994cb2b8b32453a92bcb011830fcb884f22ff3. Change-Id: I8ebbbc7fe624d8dfc8121d8814d30875c498870d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155378 Reviewed-by: Patrick Luby <plubius@neooffice.org> Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-08-06Revert "tdf#156540 invert alpha when drawing sprites"Patrick Luby
This reverts commit 52637f46cc79eb7f65a97524e92a0b2f45d3d598. Reason for revert: A better fix is being worked on in https://gerrit.libreoffice.org/c/core/+/155378 Change-Id: I91c6ed96bdd202612d4b10458c015532b9162c1a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155308 Reviewed-by: Patrick Luby <plubius@neooffice.org> Tested-by: Patrick Luby <plubius@neooffice.org>
2023-08-05tdf#156540 invert alpha when drawing spritesPatrick Luby
Due to the switch from transparency to alpha in commit 81994cb2b8b32453a92bcb011830fcb884f22ff3, a sprite's alpha mask needs to be inverted when Skia is enabled and the fAlpha value needs to be inverted when Skia is disabled. Change-Id: Ie802924b07ddbab536a2eddb57bf82e5146cffe7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155358 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de> Reviewed-by: Patrick Luby <plubius@neooffice.org>
2023-07-25Convert internal vcl bitmap formats transparency->alpha (II)Noel Grandin
(Second attempt at landing this) Image formats and graphics APIs use alpha, not transparency, so change our internal formats and data structures to work directly with alpha, so we don't need to modify data before we push it to graphics APIs. Add a couple of new Color constants to make the intention of the vcl code clearer. Notes (*) On macOS, tweaking the logic in CreateWithSalBitmapAndMask to more accurately reflect the requirements of the CGImageCreateWithMask function seems to fix some tests. (*) The vcl code does not properly support gradients with transparency. So the previous code was wrong, and this change is going to result in slightly different wrongness. Change-Id: I9e21c2e98d88ecfdc5f75db13bd1ffff7c38db98 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114168 Tested-by: Jenkins Reviewed-by: Patrick Luby <plubius@neooffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-07-13basegfx: replace typedef with a class B2ISize based on Size2DTomaž Vajngerl
Change-Id: Iaf7d02bb236f81a38a67a1430a718b6c3c78efae Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139708 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2023-07-10tdf#147999: Fix canvas font width for fallback fonts on WindowsKhaled Hosny
For some reason we are getting the wrong font width for fallback fonts, which results in rendering them squished. This happens only with VCL canvas, but not with DX one, so it shows when hardware acceleration is disabled (either explicitly or implicitly when Skia is enabled). Change-Id: I5a45b1c1d68f4c6e6dd6b43371602af3330a7cd3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154272 Tested-by: Jenkins Reviewed-by: خالد حسني <khaled@libreoffice.org>