summaryrefslogtreecommitdiff
path: root/drawinglayer
AgeCommit message (Collapse)Author
2021-05-11drawinglayer: move converter.hxx to public includeTomaž Vajngerl
Change-Id: I71a15c532ba161d69585bd47631b3a8e2f6ddd66 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115304 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2021-05-06add a unittest for impress drawing a dotted line in tdf#136957Luboš Luňák
Change-Id: Icabe039df29e9b3b9155656863120e3df7ef650b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115118 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2021-05-01fix dashed line info conversion for metafile (tdf#136957)Luboš Luňák
My previous change had two problems: - It didn't handle correctly the case when something repeated, such as dash-dot-dot. - The rounding when setting lengths was a left-over from my first attempt when LineInfo used integers and not floats. Change-Id: I914241590b1ddec22df04c05dfe65e76e921ee52 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114940 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2021-04-29do not apply line dashing in drawinglayer (tdf#136957)Luboš Luňák
basegfx::utils::applyLineDashing() is not as good as the actual VCL backend dashing, and there are some rounding errors because of all the canvas transformation matrices or whatever, which leads to the drawing problem. So use LineInfo to carry the dashing information. As a part of this change, also make LineInfo use doubles instead of ints. The use of transformation matrices means that the values may be fractional and less than one. Change-Id: Ia5ac7d266cab344b7137052c81fbd96c1ce28003 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114710 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2021-04-29remove support for BITMASK in vcl backendsNoel Grandin
Rather use a proper alpha channel if we need transparency. This is another small step towards merged alpha in our vcl layer. I suspect the intent in a lot of this code was to save memory. Which have been a thing way back then, but these days our backends mostly end up doing a copy-and-convert to a real alpha channel anyway, so the existing code is actually now a pessimisation. Change-Id: I4a2bcbb2f76b841f05bc00580f364492829c69de Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114808 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-04-28createPixelProcessor2DFromOutputDevice won't return nullCaolán McNamara
nor will createProcessor2DFromOutputDevice Change-Id: I1e0359ef2f94eeaf2da9a89d9e9dfb615587d3da Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114814 Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-04-27loplugin:moveoptNoel Grandin
An attempt that did not find anything convincing enough to finish it up and make it permanently active. So just leave it in /store for now. Change-Id: I1750e177655a4a510da100f880ba81bf762be277 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114742 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-04-26drop mask from BitmapExNoel Grandin
So that we have fewer cases to deal with when we transition to 32-bit bitmaps. (*) rename maMask to maAlphaMask, since now it is only being used for alpha duties. (*) drop mbAlpha and mbTransparent to simplify state management, the only thing we need to check for alpha is if maAlphaMask is non-empty. Change-Id: I06252e38e950e846a94b4c2ba8ea763be17801fe Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111679 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-04-17loplugin:constantparamNoel Grandin
Change-Id: I1d518bef47c838d03d8526a6a8fffd36d2ee68d9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114074 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-04-12update PCHsCaolán McNamara
Change-Id: Id3728ac0011d3deed7e56081e3a854c7fa5336f3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113959 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-04-08update PCHsLuboš Luňák
Change-Id: Ia9d04447f927e270a55500e7f35723a729bc01dd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113801 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2021-04-07Updated README.md files to represent current code / use Markdown formatHossein
Previously, all of the README files have been renamed to README.md and now, the contents of these files were changed to use Markdown format. Other than format inconsistency, some README.md files lacked information about modules, or were out of date. By using LibreOffice / OpenOffice wiki and other documentation websites, these files were updated. Now every README.md file has a title, and some description. The top-level README.md file is changed to add links to the modules. The result of processing the Markdown format README.md files can be seen at: https://docs.libreoffice.org/ Change-Id: Ic3b0c3c064a2498d6a435253b041df010cd7797a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113424 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de> Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
2021-04-06update pchesCaolán McNamara
Change-Id: I835c8fcc237ece5cf9d7a3b261645139d022e9b4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113652 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-04-03tdf#37281 tdf#45820 tdf#48916 tdf#55058 EMF Implement complex clippingBartosz Kosiorek
As the visual glitches were resolved with: https://gerrit.libreoffice.org/c/core/+/113423 It is time for enabling complex clipping. Change-Id: I12edc88fc9a55c8deedf3d87faeb50cfe0067a01 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113520 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Bartosz Kosiorek <gang65@poczta.onet.pl>
2021-04-02vcl: remove GetBitCount and GetColorCount from Bitmap{Ex}Tomaž Vajngerl
We can cast the PixelFormat enum to int for the same information and we can use the enum to reduce ambiguity when possible. Change-Id: I6ea648139465568cdeb12e5f5f75c7b609365bf4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113188 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2021-03-28drop operator bool and operator! from Bitmap and BitmapExNoel
IRC chat: <quikee[m]> noelgrandin: doesn't adding operator bool to Bitmap has the same problem as Graphic and the reason why you dropped that commit 7334034ae93b49fc93b5859a3c047a319d138282 "drop Graphic::operator bool" <noelgrandin> quikee[m], hmmm, good point <noelgrandin> maybe I should just drop both operator bool and operator! in favor of IsEmpty <quikee[m]> noelgrandin: I don't remember what the problem is I just remembered we dropped it Graphic :) sure, dropping everything for IsEmpty is probably the best Change-Id: Ieae289cda64f0b8d8fdecd5ea9e6f2bb874ff4cd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113163 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-03-26create operator bool for BitmapNoel
so we can use a more natural syntax than "!!" Change-Id: I8152a0d3ce37115fc83d332a26725ca1d28d959a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113147 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-03-26vcl: add initializer_list constructor to BitmapPalette and use itTomaž Vajngerl
Change-Id: Ib24266e435765bd5e05193aea5cee61d7a9346b0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113133 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2021-03-25const OUString -> const OUStringLiteralMike Kaganski
Mostly automated rewrite Change-Id: Ie020a083f898bc126b8fb039d4ecb2e687172da1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112965 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-03-24Using .md extension/Markdown syntax for modules READMEHossein
Renaming all README files for all top level modules to README.md, applying no content change at this stage to be able to track history of the files. These files should be edited to use correct Markdown syntax later. Change-Id: I542fa3f3d32072156f16eaad2211a397cc212665 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112977 Tested-by: Jenkins Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
2021-03-21update pchesCaolán McNamara
Change-Id: I60e61133c305673bb305e41957f5414820c7c358 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112790 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-03-19silence coverity unchecked return value from library on xmlText* functionsCaolán McNamara
Change-Id: I651abb00d8ae1bdbf758a6a0176fd8912531a585 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112753 Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-03-14loplugin:unusedmethodsNoel
Change-Id: I851eba4ca80eac9ee5896df53fbcd0f5ad125763 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112433 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-03-13add PixelFormat enum that replaces bit count in Bitmap/BitmapExTomaž Vajngerl
Bit count for the image is a numeric value (sal_uInt16) but only a handful of values make sense - namely 1,4,8,24 and 32. This replaces the numeric value with an enum, which only accepts those values and checks the correct values are used at compile time. Change-Id: I0fc137c62bce3b0d021f05019a1648da628521bc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112408 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2021-03-13update pchesJulien Nabet
Change-Id: Id6dfae9fb97fbe3fc89b9f2e083d7a3d5c1d36d3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112411 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2021-03-11use VCLUnoHelper::GetWindowCaolán McNamara
instead of directly using VCLXWindow Change-Id: I886525169834d24b6c060fb4722e1afda23dbc26 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112346 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-03-10use VCL API rather than manually apply numeric alpha changeLuboš Luňák
Change-Id: I500b3ad3d8229b792b7394a9e1b2f51fa9b1af2f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112251 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2021-03-09Make sal/config.h the first in pchMike Kaganski
By convention, it should be the first include in C/CXX files; so use of pch should not break that. Change-Id: Ic329c5f39e8f48ad1778724368e262e48972342b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112123 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-03-08make RenderMaskPrimitive2DPixel() clip using clipping (tdf#140797)Luboš Luňák
The original implementation had this peculiar idea of implementing clipping using transparency, which slows everything down, because contents need to be copied and then alpha-blended. Keep that only for when edges of the clip are to be smoothed. As a side-effect this also seems to fix tdf#115843 again. The commit also adjusts the test for tdf#133477 to not rely on the rounding introduced by the optimization from tdf#115843. Change-Id: Iebae5996159cf9f17066205985c5b591abdae105 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111966 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2021-03-06update pchesJulien Nabet
Change-Id: Id892e426343746df2f01f4cdc5f470351bdb6a12 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112099 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2021-03-06update pchesJulien Nabet
I just used ./bin/update_pch.sh Change-Id: I06a7f36eb4c511b8d6c6477fd87e57f0d9702457 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112097 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2021-03-03update pchesCaolán McNamara
Change-Id: Ide49c48738ecd537d4eb69390d22807561d3b4e1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111828 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-03-03drop TransparentType::Color usageNoel Grandin
which is dead code, since we convert to TransparentType::Bitmask in the constructor of BitmapEx Change-Id: I047b7d25317c4be4d17a8b0db9a90ec101875c9f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111683 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-02-23update pchesCaolán McNamara
Change-Id: I44424081b7f55710c4db7f10d1829de1ae08be76 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111363 Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-02-22loplugin:refcounting in drawinglayerNoel
Change-Id: Ia7bf3a4811a47180ce2a92852a01b613ff16279a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111288 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-02-19update pchesCaolán McNamara
Change-Id: Ic4586057346b6de700c1bb6ff4cd759a11bb3e4d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111231 Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-02-19Some more unit conversion unificationMike Kaganski
Change-Id: I8f0afb93ffb8bd1b88efca802fad5e9aeb447021 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111168 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-02-18loplugin:referencecasting add check for new rtl::Reference operatorNoel
rtl::Reference now has a conversion operator to uno::Reference, so look for places where we can simplify the code and use that. Change-Id: Ic81db50d670bed5e875300577d4bf5f3599cc2c4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110798 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-02-11loplugin:refcounting generalise type checkingNoel
Change-Id: Ia013878ac9c2918d8eaf9aab16b291d8211e708f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110700 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-02-01tdf#39674 Replace QuadratAntje Kazimiers
Change-Id: Icdc27fa9ab33a6c5a442760a9491e82000883ef1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110177 Tested-by: Michael Stahl <michael.stahl@allotropia.de> Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2021-01-30this method should be pure virtualNoel Grandin
otherwise there is no point in subclassing this helper class Change-Id: I141d32ec84e782003cb41c6ca7abc27fd9a16860 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110167 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-01-17cppcheck: Prefer prefix ++/-- operators for non-primitive typesJulien Nabet
Change-Id: I866665b596a37c1e111fad8afeb9d4cb4d75c257 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109469 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2021-01-16make the Color constructors explicitly specify transparencyNoel
to reduce the churn, we leave the existing constructor in place, and add a clang plugin to detect when the value passed to the existing constructor may contain transparency/alpha data. i.e. we leave expressions like Color(0xffffff) alone, but warn about any non-constant expression, and any expression like Color(0xff000000) Change-Id: Id2ce58e08882d9b7bd0b9f88eca97359dcdbcc8c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109362 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-01-16transparency->alpha in BitmapExNoel Grandin
Change-Id: I631f4ca5a2bdcb8c7691a9a8c71d3de15377213b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109390 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-01-13transparency->alpha in GraphicAttrNoel
Change-Id: I1fe9311871724ff8b7b8960f5dba6e890198565c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109211 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-01-12transparency->alpha in tools::ColorNoel
this just changes the Get/Set methods, the constructor and internal representation of Color is not changed. Change-Id: Idb6e07cc08bbaa5bd55b6bd4b585e648aef507b6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109074 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-01-08use more IsTransparentNoel
Change-Id: Ice7904f2531dba98101c5f7a05d14702fa897053 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108971 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-01-08opacity->alpha in BPixelNoel
They are basically the same thing, but alpha is the preferred term these days. Also improve the mixing algorithm, 1 - opacity is 255 - opacity not 256 - opacity since the range of sal_uInt8 is 0..255 Change-Id: I8788ac79285ab25c8d322b05817dffd3745fd699 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108963 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-01-08use more IsTransparentNoel Grandin
Change-Id: I3ef18a2601a51d56614b5da9b56e871bd33ec79e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108942 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-12-26vcl: use Color:IsTransparent() where appropriateChris Sherlock
Change-Id: I37bbab5f22f91faad65be8ef79734ce1ee6355d4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108249 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>